#P6235. Permutation

    ID: 5103 远端评测题 1000ms 256MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>2017中国大学生程序设计竞赛-哈尔滨站-重现赛(感谢哈理工)

Permutation

Problem Description

A permutation $p_1, p_2, ... , p_n$ of $1, 2, ..., n$ is called a lucky permutation if and only if $p_i \equiv 0 \pmod{|p_i - p_{i - 2}|} $ for $i = 3 ... n$.

Now you need to construct a lucky permutation with a given $n$.

Input

The first line is the number of test cases.

For each test case, one single line contains a positive integer $n(3 \leq n \leq 10^5)$.

Output

For each test case, output a single line with $n$ numbers $p_1 , p_2, ..., p_n$.

It is guaranteed that there exists at least one solution. And if there are different solutions, print any one of them.

1 6
1 3 2 6 4 5