#D2435. Addition Game
Addition Game
Addition Game
The cat Fabre came up with a simple game using addition and decided to try it with his friend Audrey, also in the cat.
The rules of the game are as follows. First of all, choose a suitable positive integer and start from there. Each player selects two adjacent digits from that number, calculates the sum, and replaces it with the original two numbers. For example, if you choose the tens and hundreds digits of "1234", the next number will be "154". If you choose the tens and hundreds of "5555", it will be "5105". Such operations are repeated alternately until the number becomes one digit, and the player who cannot perform the operation loses.
An integer value at the start of the game is given. Create a program to determine which one will win when both the first player, Fabre, and the second player, Audrey, take the best strategy.
Notes on Submission
Multiple datasets are given in the above format. The first line of input data gives the number of datasets. Create a program that outputs the output for each data set in order in the above format.
Input
The input consists of only one line with one positive integer of 1000 digits or less representing the number at the start of the game. The most significant digit is not 0.
Output
Print "Fabre wins." If Fabre wins, "Audrey wins." If Audrey wins, on one line. Note that you need to add a period at the end.
Example
Input
3 1234 5555 9
Output
Audrey wins. Fabre wins. Audrey wins.
inputFormat
input data gives the number of datasets. Create a program that
outputFormat
outputs the output for each data set in order in the above format.
Input
The input consists of only one line with one positive integer of 1000 digits or less representing the number at the start of the game. The most significant digit is not 0.
Output
Print "Fabre wins." If Fabre wins, "Audrey wins." If Audrey wins, on one line. Note that you need to add a period at the end.
Example
Input
3 1234 5555 9
Output
Audrey wins. Fabre wins. Audrey wins.
样例
3
1234
5555
9
Audrey wins.
Fabre wins.
Audrey wins.
</p>