# Not Nim

Criterion 2022 Round 18
Limits 1s, 512 MB

Alice and Bob recently learned about Nim. In a Nim game, two players play a game on several stacks of stones. Players alternatively take turns. In a player’s turn, he can choose a non-empty stack and remove some stones from that stack. When a player has no stack to choose from, he or she loses. Now Nim is a classical game and has been studied extensively. So, Alice and Bob tried to change the rules. In their version of the game, after choosing a stack with $x$ stones, if a player removes $y$ stones then there should be no number $z$ such that $x-y \leq z < x$ and $z$ divides $x$. Note that since 0 dividing any nonzero number does not make sense, players cannot choose $y=x$. Happy with the new rules, they start to play. In all games, Alice goes first.

Given the initial description of the game, output who will win given that both play optimally.

## Input

First line of the input will contain $T$ ($1 \le T \le 100000$) number of test cases.

Each test case begins with a line containing $n$, number of stacks. Next line contains $n$ space separated numbers, $i$th number is count of stones in $i$th stack.

Constraints:

• Sum of $n \le 10^5$.

• Count of stones in a stack $\le 2 \times 10^{18}$.

## Output

For each test case output who would win in a separate line. If Alice wins, write “Alice”, if Bob wins, write “Bob” without the quotes.

## Sample

InputOutput
2
3
5 6 4
2
7 7

Alice
Bob


Login to submit.

### Statistics

13% Solution Ratio
NirjhorEarliest, 1w ago
NirjhorFastest, 0.0s
NirjhorLightest, 131 kB
NirjhorShortest, 540B
Toph uses cookies. By continuing you agree to our Cookie Policy.