One day, Ks raised a question in this contest.
How many times the digit appears in the integer range of [0, n]?
The answer may be very large, please output the answer modulo .
First line contains an integer
, indicating the count of questions.
Each of the following T lines contains one integer.
Output T lines, one number per line representing the answer.