Two players, Alice and Bob, are playing a game. They have $$$n$$$ piles of stones, with the $$$i$$$-th pile initially containing $$$a_i$$$ stones.
On their turn, a player can choose any pile of stones and take any positive number of stones from it, with one condition:
The player who cannot make a move loses. Both players play optimally (that is, if a player has a strategy that allows them to win, no matter how the opponent responds, they will win). Alice goes first.
Determine who will win.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.
Each test case consists of two lines:
Additional constraint on the input: the sum of $$$n$$$ across all test cases does not exceed $$$3 \cdot 10^5$$$.
For each test case, output Alice if Alice wins, or Bob if Bob wins.
333 2 943 3 6 151 2 3 4 5
Bob Alice Bob
Name |
---|