Coupon Chaos

View as PDF

Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 977M

Problem type

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 \le n \le 5 \cdot 10^5
  • 0 \le m \le 5 \cdot 10^5
  • 1 \le i, j \le n, i \neq j

It is guaranteed that the sets \{i, j\} are distinct.

Example 1

Input
1 0
Output
Bob

Example 2

Input
2 1
1 2
Output
Alice

Example 3

Input
5 4
2 1
5 4
2 3
3 1
Output
Bob

Comments

There are no comments at the moment.