Coupon Chaos
Alice challenges Bob to a coupon trading game.
There are n types of coupons, and Bob's goal is to collect them all.
Before the game begins, Alice is provided with m distinct sets of coupon types, each of size 2.
For each set {i,j}, Alice must add exactly one of (i,j) or (j,i) to the set of allowed trades.
Then, Bob performs each of the following actions exactly once:
- Pick two distinct allowed trades (i,j) and (s,t), and add the trades (i,t) and (s,j) to the set of allowed trades.
- Pick a coupon type i and receive exactly one coupon of that type.
During the game, for each allowed trade (i,j), Bob can perform the following operations any number of times:
- Trade 1 coupon of type i for 2 coupons of type j.
- Trade 2 coupons of type j for 1 coupon of type i.
Bob wins if at some point in the game, he simultaneously holds at least one coupon of every type. Otherwise, Alice wins.
Assuming choices are made optimally, determine if Alice or Bob are guaranteed to win.
Input
The first line contains two integers n and m, the number of coupon types and the number of sets provided to Alice respectively.
The following m lines contain integers i,j, representing the set {i,j}.
Output
Output one line consisting of either Alice or Bob, representing who has the winning strategy.
Constraints
- 1≤n≤5⋅105
- 0≤m≤5⋅105
- 1≤i,j≤n, i=j
It is guaranteed that the sets {i,j} are distinct.
Example 1
1 0
Bob
Example 2
2 1
1 2
Alice
Example 3
5 4
2 1
5 4
2 3
3 1
Bob
Comments0
No comments yet
Be the first to comment.
New comment
Log in to join the discussion.