| Codeforces Round 1077 (Div. 2) |
|---|
| Finished |
You are given an integer $$$n$$$. Construct a permutation$$$^{\text{∗}}$$$ $$$p$$$ of length $$$n$$$ satisfying the following condition:
It can be proven that such a permutation always exists under the constraints of the problem.
$$$^{\text{∗}}$$$A permutation of length $$$n$$$ is an array consisting of $$$n$$$ distinct integers from $$$1$$$ to $$$n$$$ in arbitrary order. For example, $$$[2,3,1,5,4]$$$ is a permutation, but $$$[1,2,2]$$$ is not a permutation ($$$2$$$ appears twice in the array), and $$$[1,3,4]$$$ is also not a permutation ($$$n=3$$$ but there is $$$4$$$ in the array).
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). The description of the test cases follows.
The only line of each test case contains a single integer $$$n$$$ ($$$2 \le n \le 100$$$) — the length of the permutation $$$p$$$ to be constructed.
For each test case, output $$$n$$$ integers $$$p_1,p_2,\ldots,p_n$$$ ($$$1 \le p_i \le n$$$, all $$$p_i$$$-s are distinct) — the permutation you constructed.
If there are multiple valid permutations, you may output any of them.
223
1 22 3 1
In the first test case, $$$p=[1,2]$$$ satisfies the condition because $$$\lvert p_1-p_2\rvert=\lvert 1-2\rvert=1$$$, which is divisible by $$$1$$$.
In the second test case, $$$p=[2,3,1]$$$ satisfies the condition because:
| Name |
|---|


