Alice and Bob are playing a simple game on marbles. They have a bucket containing marbles, and the rules of the game are as follows:
1. Alice and Bob alter their turns, while Alice makes the first move.
2. Each move consists of removing one or more marbles from the bucket.
3. In the first move, Alice can remove any number of marbles, but not all the marbles in the bucket.
4. In subsequent moves, the current player can remove at most five times the number of marbles removed by the other player in the last move.
5. The player who cannot make a move loses. The other player is considered the winner.
6. Both player plays optimally.
First line of the input contains a single integer () - denoting the number of test cases. Next lines each contains a single integer () - denoting the number of marbles in the bucket.
For each test case, output the winner of the game (Alice or Bob) in a single line.
Input | Output |
---|---|
8 2 4 6 7 8 10 12 14 | Bob Bob Bob Alice Bob Bob Bob Alice |
For N=4, Alice can remove 1 or 2 or 3 marbles in his first move. For N=7, Alice will remove only 1 marble in his first move. |