As a tradition, the Code Village holds an annual championship, named ICPC (Intelligence Championship for Platinum Coders) to search for its most outstanding genius. The participants take part in various contests to find out who is the potential genius. The competitions include Go, Reversi, Sudoku and even Paper-Scissor-Rock, and it is fascinating to see the unpredictable result. Well... At least a few years ago.
Everything changed when an AI robot came to the village - it seems weird, but as the name of the contest shows, anything related to `intelligence' can take part freely. The robot soon won all the competitions without difficulty, and remained the defending champion for years and years. Everyone considered it to be undefeatable. And this time, your task will be - as you have figured out - beat the robot!
You are not alone - you will have a teammate. To make the game more interesting, the organizing committee has slightly modified the rule and it will be a guessing game. The game process is as follows:
Some typical settings may apply here. For example, the three of you all have unlimited and accurate memory, your team can discuss strategies before the game starts (of course NOT during the game), while the robot has the access to your strategy. You can also assume that the three of you will play optimally to achieve their goals: for you two the goal is definitely to win the game, while for the robot it will do its best to prevent your victory.
Let's take some examples. For , your team will definitely win by always answering
. For
, a solution that ensures your victory works like this: your friend always answer the value of
, and when you enter the room you just check if
differs from
: if so then choose
, otherwise choose
. It is clear to see that such strategy works perfectly. However, it can be proved that for
your team has no chance to win at all.
There are five hours left before the competition, and you decide to do some practice by writing a program to determine that for certain pair of , which side will win the game. You will have to answer
independent queries.
The first line of input contains an integer
, the number of queries you have to answer.
Each of the next
lines indicates a query. The
-th among them contains two integers
, denoting the
-th situation with parameters
. Recall that each query is independent.
Outputlines, the
-th of which shows the winning side of the
-th situation. If your team is going to win, print a line of
; otherwise display
.