This is a giveaway problem.
Alice and Bob are playing a game. The game is as follows: Given $N$ intervals, where the $i$-th interval is $[l_i, r_i]$ (inclusive). Alice and Bob take turns (Alice goes first). In each turn, a player can choose an interval $i$ that has not been deleted yet, such that: 1. Interval $i$ contains interval $j$. And all intervals $j$ that have not been deleted are also deleted. The player who cannot make a move loses the game.
Given $N$ and these $N$ intervals, determine who wins under optimal play, Alice or Bob. To prevent code that outputs results randomly, this problem contains multiple test cases.
The test data guarantees that any two intervals only have containment or non-overlapping relationships. It is also guaranteed that all $l_i, r_i$ are distinct.
Key hint for the giveaway: Given a tree, each time you delete an edge, all nodes in the subtree away from the root are deleted. The player who cannot make a move loses. The following theorem applies: The SG value of a leaf node is 0, and the SG value of an internal node is the XOR sum of the SG values of its children plus 1.
Input
The first line contains $T$ ($T \le 10$), representing the number of test cases. For each test case, the first line contains $N$, the number of intervals. The next $N$ lines each contain two positive integers $l_i, r_i$ ($l_i \le r_i$), representing the range of the $i$-th interval.
Output
For each test case, output the result. If Alice wins, output "Alice", otherwise output "Bob" (without quotes).
Examples
Input 1
1 2 1 4 2 3
Output 1
Alice
| Case | $N$ | $l_i, r_i$ |
|---|---|---|
| 0 | 10 | .h=10 $\le 1000000007$ |
| 1 | ||
| 2 | 100 | |
| 3 | ||
| 4 | 1000 | |
| 5 | ||
| 6 | 50000 | |
| 7 | ||
| 8 | ||
| 9 |