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
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.