Time limit
2s
Memory limit
128 MB
There are N cards arranged in a line, numbered from 1 to N. You need to choose their initial order so that the following magic trick places the cards on the table in the order 1, 2, ..., N.
On step i (1 <= i <= N), repeat the following operation i times on the remaining deck: move the front card to the back. Then place the front card on the table. The card placed on step i must be i.
Given N, print an initial card order that satisfies this process.
The first line contains the number of cards N.
Print the initial card order from front to back on one line, separated by spaces.
If the initial order is 2 1 4 3, the process works as follows.