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.

Difficulty: interview

Starter code:

Solutions:
# cook your dish here
from sys import stdin
from math import sqrt,ceil,log10
def get_sum(a,b,digits):
    sum=((b+a)*(b-a+1))//2
    return sum*digits

def solve():
    mod=10**9+7
    thehighlimiter={i: 10 ** i - 1 for i in range(12)}
    thelowlimiter={i: 10**i for i in range(12)}
    for _ in range(int(input())):
        l,r=map(int, stdin.readline().strip().split())
        low=len(str(l))
        high=len(str(r))
        ans=0
        if low==high:
            ans=get_sum(l,r,low)
        else:
            ans+=get_sum(l,((10**low)-1),low)
            ans+=get_sum((10**(high-1)),r,high)
            for i in range(low+1,high):
                ans+=get_sum(10**(i-1),(10**i)-1,i)
        print(ans%mod)

def __starting_point():
    solve()

__starting_point()

m = 10**9 + 7
def get_sum(a, b, digits):
    sum = ((b + a) * (b - a + 1)) // 2
    return sum * digits
for _ in range(int(input())):
    l, r = map(int,input().split())
    l_digits = len(str(l))
    r_digits = len(str(r))
    if(l_digits == r_digits):
        ans = get_sum(l, r, l_digits)
    else:
        ans = (get_sum(l, ((10 ** l_digits) - 1), l_digits) + get_sum((10 ** (r_digits - 1)), r, r_digits))
        for i in range(l_digits + 1, r_digits):
            ans += get_sum(10 ** (i - 1), (10 ** i) - 1, i)     
    print(ans%m)

t = int(input()) #number of test cases
mod = 1000000007

def get_sum(a, b, digits):
    sum = ((b + a) * (b - a + 1)) // 2
    return sum * digits

for _ in range(t):
    l, r = [int(x) for x in input().split()]
    l_digits = len(str(l))
    r_digits = len(str(r))
    ans = 0
    if(l_digits == r_digits):
        ans = get_sum(l, r, l_digits)
    else:
        ans += get_sum(l, ((10 ** l_digits) - 1), l_digits)
        ans += get_sum((10 ** (r_digits - 1)), r, r_digits)
        for i in range(l_digits + 1, r_digits):
            ans += get_sum(10 ** (i - 1), (10 ** i) - 1, i)
        
    print(ans%mod)

def len(n):
    x=0
    while n>0:
        x+=1
        n=n//10
    return x
e=10**9+7
t=int(input())
#l=[0]
#for i in range(1,10**7):
    #l.append((l[-1]+i*len(i))%e)

f=[0]
a=9
b=1
for i in range(10):
    x=(2*b+a-1)%e
    x=(x*a)%e
    y=pow(2,e-2,e)
    x=(x*y)%e
    x=(x*(i+1))%e
    x=(x+f[-1])%e
    b*=10
    a*=10
    
    f.append(x)
#print(f)
def ans(n):
    if n==0:
        return 0
    x=len(n)
    y = f[x-1]
    a=pow(10,x-1,e)
    b=((n+a)*(n-a+1))%e
    b =(b*pow(2,e-2,e))%e
    b=(b*x)%e
    #print(y,b,n)
    return (b+y)%e
    
    
for _ in range(t):
    a,b=map(int,input().split())
    #print(l[b]-l[a-1])
    b = ans(b)
    a=ans(a-1)
    print((b-a)%e)
    



t = int(input())

for i in range(t):

  l,r = map(int,input().split())
  start = len(str(l))
  end = len(str(r))
  if end>start:
   end_start = int(str('9'*start))
   sum_start = ((end_start + l)*start*((end_start-l+1)))//2
  else:
      sum_start = ((l+r)*start*(r-l+1))//2


  sum = 0

  # print(sum_start)
  for j in range(start+1,end):
      sum+=((10**(j-1)+(int(str('9'*j))))*j*(((int(str('9'*j))-(10**(j-1))+1))))//2

  if end>start:
   end = len(str(r))
   end__start = int(str(10**(end-1)))
   sum__start = ((end__start + r)*end*(r-end__start+1))//2
  else:
      sum__start = 0
  # print(end__start)
  # print(sum)
  # print(sum,sum__start,sum_start)
  print((sum+sum__start+sum_start)%1000000007)