numberspeak

Problem Description

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.

Input

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.

Output

The output should consist of T lines, with the ith line representing what the AI should say after being given Xi.

Limits

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.

Sample Input 1

2
592
6070

Sample Output 1

Five nine two
Six zero seven zero


Submitting .cpp to 'numberspeak'


You're not logged in! Click here to login

Time Limit: 1 Seconds
Memory Limit: 1024MB
Your best score: 0
Source: Dunjudge Archive

Subtask Score
1 17
2 23
3 36
4 24
5 0