A simple game
-------------
In this game, there are two piles of rocks. Players A, B take turns making
moves, with A always making the first move. At each move a player can remove
one rock from the first or the second pile. Note that a player can remove
rocks from a pile only when it is non-empty, and that (s)he can take one rock
in total or one rock from each pile. Removing no rocks is not a valid move.
The person taking the last rock wins the game.
You are given the numbers (say i,j) of the rocks in the two piles. Write a
program to determine who wins if both play as well as possible.
Input
A number of lines each containing two integers i,j, each no bigger than 1000.
The input is terminated by a 0 0 on the last line, which should not be
processed.
Output
The winner (see below for the format) for each case, one per line.
Sample input
1 1
2 1
0 0
Sample Output
A wins
A wins