Polo, the Penguin, likes numbers. He says that the goodness of a number is itself multiplied by the number of digits in it's decimal representation. For example, the goodness of the integer 474 is 474*3 = 1422.
Help him to count the sum of goodness of all integers from L to R, inclusive. Since the answer can be too large, output it modulo 1,000,000,007 (10^9+7).

Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. The only line of each test case contains the pair of integers L and R, separated by a single space.

Output
For each test case, output a single line containing the answer to the corresponding test case.

Constraints

1 ≤ T ≤ 1,000
1 ≤ L ≤ R ≤ 1,000,000,000 (10^9)


Example
Input:
1
9 12

Output:
75


Explanation
Example case 1. The answer is 9*1 + 10*2 + 11*2 + 12*2 = 75.
t = input()


def digits(n1):
	cnt = 0
	while(n1 != 0):
		cnt += 1
		n1 /= 10
	return cnt ; 


def res(n):
	result = 0
	dig = digits(n) 
	if (dig == 1):
		return (n*(n+1))/2 ; 
	ns = 0
	for i in range(1,dig):
		if (i == 0):
			ns = 0
			continue 
		else:
			ns = 9*(10**(i-1))


		st = 10**(i-1)
		en = 10**i -1 
		#print i , ns , st , en 
		result += ((ns*(st+en))/2)*i 
		#print result,i 
	stt = 10**(dig-1)
	enn = n
	nss = enn - stt +1
	result += ((nss*(enn+stt))/2)*dig
	return int(result) ; 




it = 0 
while (it < t):
	s = raw_input()
	s1 = s.split(" ")
	l = int(s1[0])
	r = int(s1[1]) 
	#print res(r)
	
	print ((res(r)-res(l-1))%1000000007)

	it += 1