409650: GYM103660 C Ah, It's Yesterday Once More

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Ah, It's Yesterday Once Moretime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Boboge remembers The 2021 ICPC Asia Nanjing Regional Contest, Problem D. The problem gives you an array $$$a$$$ and asks you how many times the expression "Swap $$$a_i$$$ and $$$a_j$$$" has been executed if you call $$$Sort(a)$$$ which is implemented by the following Algorithm 1.

As the algorithm looks quite like the normal bubble sort, Boboge wants you to construct a permutation of length $$$n$$$ as the array $$$a$$$, so that the number of times the expression "Swap $$$a_i$$$ and $$$a_j$$$" has been executed equals to the number of times the expression "Swap $$$a_j$$$ and $$$a_{j+1}$$$" has been executed when we call $$$Sort(a)$$$ and $$$BubbleSort(a)$$$ respectively.

A permutation 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,5]$$$ is also not a permutation ($$$n=4 $$$ but there is $$$5$$$ in the array).

Input

The first line contains a single integer $$$T(1\le T\le 2\times 10^5)$$$ — the number of test cases.

Each test case consists of one line containing one integer $$$n(1\le n\le 2\times 10^5)$$$ — the length of permutation that you need to construct.

It is guaranteed that $$$\sum n\le 2\times 10^5$$$ over all test cases.

Output

For each test case, print $$$n$$$ integers in a line — the permutation you construct.

If there are multiple answers, print any. It can be proved that there is always a valid answer.

ExampleInput
2
1
2
Output
1
2 1

加入题单

算法标签: