Vacation

3

1 votes
Easy-Medium
Problem

Alice and Bob just finished their final exams and are enjoying their vacations. But, well, as days

passed by, they started feeling bored at home. So they decided to go out on a trip. Alice said they

should go to the nearby water park, while Bob wanted to go to the zoo. They started fighting and

Alice (the younger one), started crying. Fearing that he might be scolded from their parents, Bob

started thinking of ways to stop Alice from crying. So, he suggested a game and it was decided that

the winner of the game will decide where they both will go. The game goes like this :

  1. n coins are placed in a row.

  2. In a move, the player picks a coin along with all the coins to its left, or to its right, such that he leaves a non-zero number of coins for the next player.

  3. The player who can't make a move loses.

  4. Alice plays the first move.

Alice doesn't want to lose. So, she turns to you for help. She wants to know whether she should play the game or not.

Input :

First line contains an integer T, the number of Test cases.

Each test case contains one line. On each line is an integer n, the number of coins at the start of the

game.

Output :

You have to tell who wins the game. Print “Alice” (without quotes) if she wins the game, or “Bob”

(without quotes) if he wins the game.

Constraints :

T <= 106

0 < n<= 107

Problem setter : Sahil Prakash

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?