Counting non-decreasing digit sequences

No attempts yetTime limit1sMemory limit128 MB

Problem

Yasser is an Egyptian coach, and he is running a training camp in Jordan. On the last day the participants solved every hard problem he had brought, so he gave them one more task.

Count the sequences (d1,d2,,dN)(d_1, d_2, \ldots, d_N) of NN digits, each one between 0 and 9, that satisfy d1d2dNd_1 \le d_2 \le \cdots \le d_N. A sequence whose first digit is 0 counts as well.

Input

The first line contains the number of test cases TT. (T100T \le 100)

Each of the next TT lines contains one integer NN. (1N1000001 \le N \le 100000)

Output

For each test case, print the number of valid sequences modulo 10000000071000000007 on its own line.