Alice and Bob are playing a game.
Initially, there are (
) piles of stones, the
-th of which has
(
) stones. We call a pile empty if there are no stones in it currently.
Alice and Bob take turns to operate as follows (of course, Alice operates first):
Arbitrarily pick one pile that is not empty.
Remove some or all stones (at least one) of that pile.
Rearrange the remained stones of that pile. That means, for each remaining stone of that pile, one can move it to another non-empty pile, or just do nothing(then it still remains in the same pile).
The player who can't operate loses, or equally, the player who takes the last stone wins. It can be proved that Alice or Bob has a strategy to win the game. Alice and Bob are wondering who will win the game finally if they both play optimally. So, they give you the entire information about the piles of stones. Please determine who will win the game if they both play optimally.
To make sure you handle their question seriously rather than just guess the right answer, they will ask questions, each of which contains
, which means that they will play a game on piles in
. You should answer all the questions correctly to convince them.
The first line contains two positive integers
(
)---the number of piles of stones and the number of games they will play.
The second line containspositive integers
(
), denoting that there are
stones in the
-th pile initially.
The nextlines, each of which contains two integers
(
), denoting they will play a game on piles in
.
Outputlines, each of which contains Alice or Bob, indicating the winner if both sides play optimally.