Processing math: 20%

Problem K. Kendall

Author:A. Tyshchenko, A. Klenin   Time limit:1 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  

Statement

Let X, Y be sequences each consisting of N unique integers and 1. The Kendall correlation coefficient between these sequences is

\tau=\sum\limits_{i\lt j}\sgn\left(x_i-x_j\right)\sgn\left(y_i-y_j\right).

sgn(x) = x \lt 0 \Rightarrow -1,\,x \gt 0 \Rightarrow +1,\,x = 0 \Rightarrow 0.

Suppose that sequence X is 1, 2, \ldots,\,N. Your program must find sequence Y such that \tau(X,\,Y) = 0.

Input format

Input contains a single integer N — number of elements in a sequence.

Output format

Output must contain N integers — sequence Y. If the required sequence does not exist, output -1. If there are several solutions, output any of them.

Constraints

1 \le N \le 10^5

Sample tests

No. Standard input Standard output
1
6
-1
2
4
4 1 2 3

0.039s 0.006s 13