2018 Asia Singapore Preliminary Contest

Start

2018-09-15 02:00 UTC

2018 Asia Singapore Preliminary Contest

End

2018-09-15 07:00 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -276 days 2:38:04

Time elapsed

5:00:00

Time remaining

0:00:00

Problem G
Fooling Around

Alice and Bob take turns playing a game, with Alice going first. They begin with a pile of $N$ stones, each turn removing one less than a prime number of stones. The person who removes the last stone wins. Given $N$, determine who wins the the game, assuming Alice and Bob both play optimally.

Input

The first line of input consists of a integer $Q$, the number of testcases, with $1 \leq Q \leq 100$. The next $Q$ lines each contains a single integer $N$, representing the number of stones in the pile, where $1 \leq N \leq 10^9$.

Output

For each test case, output the winner “Alice” or “Bob”. Each testcase’s output should be printed on their own line.

Sample Input 1 Sample Output 1
6
1
2
3
5
8
13
Alice
Alice
Bob
Alice
Bob
Alice