A good number is defined as all digits in decimal system are between 1 and 9, inclusive. The value of one good number can be calculate as follow:
Insert + into some of the positions (possibly none) between two digits.
After insertion, this good number can be evaluated as formulas, and the result is S.
The value is sum of S of all possible legal insertion. The legal insertion is that any two neighbor digits can insert no more than one ‘+’. Inserting before the first digit or after the last digit is illegal.
Alfa wants you to calculate the value.
Input
The first line is an integer T(1≤T≤52), which indicates the number of testcases.
For each testcase:
The one line of the input file contains a good number N。
N的位数小于100000位切大于等于1位;(是N的位数小于100000位,不是指N的值小于100000)
N is positive integer.
Output
For each testcase, your program should output the value of the good number mod 1e9+7.
Insert + into some of the positions (possibly none) between two digits.
After insertion, this good number can be evaluated as formulas, and the result is S.
The value is sum of S of all possible legal insertion. The legal insertion is that any two neighbor digits can insert no more than one ‘+’. Inserting before the first digit or after the last digit is illegal.
Alfa wants you to calculate the value.
Input
The first line is an integer T(1≤T≤52), which indicates the number of testcases.
For each testcase:
The one line of the input file contains a good number N。
N的位数小于100000位切大于等于1位;(是N的位数小于100000位,不是指N的值小于100000)
N is positive integer.
Output
For each testcase, your program should output the value of the good number mod 1e9+7.
