#GYM104671H. Cyclically Coprime
Cyclically Coprime
Description
You are given a single integer $n$. Please output any permutation $p_1, p_2, ..., p_n$ such that for all $1 \leq i < n$, $p_i$ and $p_{i + 1}$ are coprime. Additionally, $p_1$ and $p_n$ must be coprime.
A permutation of length $n$ is a sequence of $n$ integers such that all integers between $1$ and $n$ inclusive appear in it exactly once.
Two integers are coprime if their greatest common divisor is equal to $1$.
It can be proven that such a permutation always exists.
The first and only line of input consists of a single integer $n$ $(1 \leq n \leq 2 \cdot 10^5)$.
On the first and only line, output $n$ space-separated integers $p_1, p_2, ..., p_n$ that satisfy the constraints of the problem.
If there are multiple solutions, you may output any such one.
Input
The first and only line of input consists of a single integer $n$ $(1 \leq n \leq 2 \cdot 10^5)$.
Output
On the first and only line, output $n$ space-separated integers $p_1, p_2, ..., p_n$ that satisfy the constraints of the problem.
If there are multiple solutions, you may output any such one.
5
2
4 1 2 5 3
1 2
Note
In the first sample test case, the output is valid because $\gcd(4, 1) = \gcd(1, 2) = \gcd(2, 5) = \gcd(5, 3) = \gcd(4, 3) = 1$. There are other valid outputs for $n = 5$, for example $2, 3, 5, 4, 1$.