Matches for children are not toys!#1005

Matches for children are not toys!

1 second
128 megabytes
Very easy
prb1005

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?

Input

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.

Output

Print a sequence of ones and twos: 1 if the first player wins and 2 if the second player wins.

Examples

Example 1

Loading
Loading