B. Balindromes
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

In the realm of Numeralia, a fascination with symmetry and balance pervades the culture, especially when it comes to numbers. The Numeralians hold a particular reverence for palindrome numbers, those unique numbers that read the same backward as forward, such as 323 and 111. A challenge has been set forth to the mathematicians of Numeralia: for given ranges, determine how many palindrome numbers exist between two boundaries, inclusive. This task, known as the Palindrome Count Query, tests both the mathematicians' understanding of number properties and their ability to navigate through vast numerical spaces efficiently.

Input

The first line of the input specifies $$$Q$$$ ($$$1 \leq Q \leq 10^4$$$), the number of queries. Each of the following $$$Q$$$ lines contains two integers $$$L$$$ and $$$R$$$ ($$$1 \leq L \leq R \leq 10^{18}$$$), representing the lower and upper bounds of the range for that query.

Output

For each query, output a single line containing the number of palindrome numbers that lie within the range $$$[L, R]$$$, inclusive.

Examples
Input
1
1 100
Output
18
Input
1
23 55
Output
3