Problem A
References |
Problem B
Sum of powers |
Problem C
Game |
Problem D
Crossword |
Problem E
Magic of David Copperfield |
Problem F
Puncher |
Problem G
Flying Stars |
Problem H
Divide et unita |
Input file | INPUT.TXT |
Output file | OUTPUT.TXT |
Time-limit/Test | 10 seconds |
|
|
|
|
|
|
|
|
|
|
|
|
Just now, David is trying to repeat this trick. Unfortunately, he had a hard day before, and you know how hard to conjure with a headache. You have to write a program that will help David to make his trick.
Input
The input file contains a single integer number N (2<=N<=100).
Output
Your program should write the following lines with numbers to the output file:
k1 x1,1 x1,2 ... x1,m1
k2 x2,1 x2,2 ... x2,m2
...
ke xe,1 xe,2 ... xe,me
where ki is a number of moves the audience should make on the i-th turn (2N<=k<=10000). All ki should be different (i.e. ki <> kj when i <> j). xi,1, xi,2, ... , xi, mi are the numbers of the pictures David should remove after the audience will make ki moves (the number of the pictures removed is arbitrary, but each picture should be listed only once, and at least one picture should be removed on each turn).
A description of the every next turn should begin with a new line. All numbers on each line should be separated by one or more spaces. After e iterations, all pictures except one should be removed.
Sample input
3Example of the output for the sample input
8 4 6 13 9 10 7 1 7 8 11 3 5