Permutation
题号:NC14305
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 64 M,其他语言128 M
Special Judge, 64bit IO Format: %lld

题目描述

A permutation p1, p2, ... , pn of 1, 2, ..., n is called a lucky permutation if and only if pi ≡ 0 (mod|pi - pi - 2|) for i = 3 ... n. Now you need to construct a lucky permutation with a given n.

输入描述:

The first line is the number of test cases.
For each test case, one single line contains a positive integer n(3 ≤ n ≤ 105).

输出描述:

For each test case, output a single line with n numbers p1, p2, ... , pn.
It is guaranteed that there exists at least one solution. And if there are different solutions, print any one of them.
示例1

输入

复制
1
6

输出

复制
1 3 2 6 4 5