Mary really enjoys playing with numbers - just like you.
From time to time she chooses a function and seeks for a permutation of
numbers which minimizes the value of the function.
Now she is considering the following function, which she finds quite elegant:
Here denotes the absolute value of the number .
Unfortunately, this example turned out to be difficult to Mary.
If you are willing to help her, write a program that finds any permutation
of the sequence which minimizes the value of .
Input
The first and only line of input contains an integer
().
Output
Your program should output a single line with space-separated integers:
a permutation of for which attains a minimum value.
If there are multiple such permutations, your program should output
any one of them.
Example
For the input data:
4
a correct result is:
2 4 1 3
whereas for the input data:
5
a correct result is:
3 2 5 1 4
Task author: Szymon Acedanski.
Kontakt
In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you would like to talk about tasks, solutions or technical problems, please visit our Discord servers. They are moderated by the community, but members of the support team are also active there.