Home | 
Hotel |
Persyaratan | 
Jadwal | 
Peraturan | 
Hadiah | 
Finalist | 
Informasi
|
ACM-ICPC INC 2008 - Practice Session
Problem A
1 2 Hop!
Time Limit: 1s
Lie is a good kindergarten's teacher. He has taught the children to count numbers from 1 to 9 using a simple game. Here is the game:
Lie will say a number to the children. For the number that he says, he wants the children to count from 1 to N for N times, with every number N replaced by a yell "hop!" For example:
If he says 3, then the children will count: "1 2 hop! 1 2 hop! 1 2 hop!"
If he says 4, then the children will count: "1 2 3 hop! 1 2 3 hop! 1 2 3 hop! 1 2 3 hop!"
However if he says any number larger than 9, then the children will shout: "what?"
Now, write a program to simulate Lie's teaching. You should do it FAST or other contestants will beat you.
Input
The first line of input contains an integer T, the number of test cases follow.
Each test case contains a single integer N (1 <= N <= 20), the number that Lie says.
Output
For each case, print the children's yelling in a single line. Each counting should be separated by a single space (see output example).
Sample Input | Output for Sample Input |
3
3
4
15
| 1 2 hop! 1 2 hop! 1 2 hop!
1 2 3 hop! 1 2 3 hop! 1 2 3 hop! 1 2 3 hop!
what?
|
Source: BNPC-HS 2007 Final Round
|
|