#P1791. PalindromicNumber

PalindromicNumber

A palindromic number is a number that remains the same when its digits are reversed.

For instance,the first palindromic numbers are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, ...

Now your task is answer the queries about the palindromic numbers between a interval [a,b].

Input

First line contains a integer T which is the number of test cases.(T<=10^2)
And there are T lines later,which contains two intergers a,b.(0<=a<=b<=10^8)

Output

For each test case, you should output the answers and every line only contains one integer.
After each case,print a blank line.

Sample Input

2
1 3
10 12

Sample Output

1
2
3

11

HINT

</p>

Source