Gug is building an AI, and is trying to teach the AI how to speak numbers. As Gug finds it too complicated to deal with human things like hundreds or thousands or millions, Gug is teaching his AI simply to recite out the numbers, in decimal form. For example, 592 will be read by his AI as Five nine two and 6070 will be read by his AI as Six zero seven zero.
Gug has a total of T large numbers to give to his AI. The ith number that Gug wants to give to his AI is denoted as Xi. Help Gug determine what his AI will say.
The first line of input will contain one integer, T.
The next T lines of input will contain one integer each, with the ith line containing Xi.
The output should consist of T lines, with the ith line representing what the AI should say after being given Xi.
Subtask 1 (17%): T = 1, 1 ≤ Xi ≤ 9.
Subtask 2 (23%): T = 1, 1 ≤ Xi ≤ 109.
Subtask 3 (36%): 1 ≤ T ≤ 103, 1 ≤ Xi ≤ 109.
Subtask 4 (24%): 1 ≤ T ≤ 103, 1 ≤ Xi ≤ 10100.
Subtask 5 (0%): Sample Testcases.
2 592 6070
Five nine two Six zero seven zero
Subtask | Score |
---|---|
1 | 17 |
2 | 23 |
3 | 36 |
4 | 24 |
5 | 0 |