Jon and Arya are playing a game. Rules of game as follows:
· They have a single number N initially.
· Both will play on alternate move. Jon starts first.
· Both will play each move optimally.
· In each move, they can perform only one of these operation
1. Divide that number by 2, 3, 4 or 5 and take floor of result.
2. Subtract that number by 2, 3, 4 or 5.
· When number become zero game will stop.
· Who move last move in game will win this game.
First line of input contain a integer T as test cases, next T line contain a single integer N.
Print name of winner on each test case in separate line.
For first test case Jon will subtract 3 from initial number and win the game. For the second test case Jon will divide by 3 and then in next step arya will subtract by 2 and win the game.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.