For positive integers , define as the integer formed by concatenating copies of the decimal representation of . For example, and .
You are given a sequence of positive integers . Find the value of the following expression modulo .
The input is given in the following format:
For each test case, print the required remainder on one line.
The first product is . The second is .
Each case is given in the following format:
is the number of test cases.
| 2 | 19 | , (), and the sum of over all test cases is at most . |
| 3 | 27 | (). |
| 4 | 43 | No additional constraints. |