Winter has finally arrived at Winterfell so Bran and Arya stark decided to play a game of coins.
The Game goes like this .
There are N coins placed on a table each of denomination K. For each move a player can choose a coin placed on the table and replace it with some number of coins (more than one) such that the new placed coins sum up to the denomination of the replaced coins, have equal values and are not less than P.
All denominations are in integer and there is an infinite supply of coins.One who can't make a move will lose the game.
Bran starts the game and both of them will play in the optimal way. Determine the winner.
INPUT:-
The first line of each input file contains T which is the number of test cases.
Following T line contains three integers N,K,P.
OUTPUT:-
Print "BRAN", if Bran wins, or "ARYA", if Arya wins, (without quotes)
CONSTRAINTS:-
1 <= T <= 100
1 <= N, K, P <= 1000000000