
There are matches on the table. Two players take turns. A player may take no more than matches, but not less than one. The player who takes the last match wins.
Who will win in the regular game: the first or the second player?
The first line contains the number of test cases (1 \le t \le 100). Each of the next lines contains the number of matches in the pile and the maximum number of matches that can be taken in one move. It is known that 1 \le n, m \le 2 \times 10^9.
Print a sequence of ones and twos: 1 if the first player wins and 2 if the second player wins.
Example 1