Problem7480-- [CSES Problem Set] Permutations

7480: [CSES Problem Set] Permutations

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB  Special Judge

Description

A permutation of integers $1,2,…,n$ is called beautiful if there are no adjacent elements whose difference is $1$.
Given $n$, construct a beautiful permutation if such a permutation exists.

Input

The only input line contains an integer $n$.

Output

Print a beautiful permutation of integers $1,2,…,n$. If there are several solutions, you may print any of them. If there are no solutions, print "NO SOLUTION".

Constraints

$1 \leq n \leq 10^6$

Sample 1 Input

5

Sample 1 Output

4 2 5 3 1

Sample 2 Input

3

Sample 2 Output

NO SOLUTION

HINT

相同题目:CSES 1070

Source/Category