#P11088. [2016杭电多校]Different Sums

    ID: 10230 传统题 1000ms 256MiB 尝试: 3 已通过: 2 难度: 8 上传者: 标签>CF2500提高+/省选-序列构造差分转化同余的加减乘运算暴力枚举埃氏筛

[2016杭电多校]Different Sums

Different Sums

Problem Description

A subsum of the sequence is sum of one or more consecutive integers of it. You are given an integer NN(1≤N≤20001\leq N \leq 2000 ). Your task is to make a sequence of integers which are less than 3(N+6)3(N+ 6), such that its all subsums (N(N+1)/2N (N +1) / 2 in total) are different from each other.

Input

There are several test cases. The first line of the input contains an integer T(1≤T≤200)T(1\leq T\leq 200 ), the number of test cases. Each of the next TT lines contains an integer ,NN the length of the sequence.

Output

For each test case, print one line with NN space separated integers representing your sequence. If multiple solutions exist, any of them will be accepted.

Sample Input

2
2
5

Sample Output

1 2
1 2 4 8 16

Author

金策工业综合大学(DPRK)

Source

2016 Multi-University Training Contest 9