#P1981D. Turtle and Multiplication

    ID: 10533 Type: RemoteJudge 3000ms 512MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>constructive algorithmsdfs and similargraphsmathnumber theory

Turtle and Multiplication

Description

Turtle just learned how to multiply two integers in his math class, and he was very excited.

Then Piggy gave him an integer nn, and asked him to construct a sequence a1,a2,,ana_1, a_2, \ldots, a_n consisting of integers which satisfied the following conditions:

  • For all 1in1 \le i \le n, 1ai31051 \le a_i \le 3 \cdot 10^5.
  • For all 1i<jn11 \le i < j \le n - 1, aiai+1ajaj+1a_i \cdot a_{i + 1} \ne a_j \cdot a_{j + 1}.

Of all such sequences, Piggy asked Turtle to find the one with the minimum number of distinct elements.

Turtle definitely could not solve the problem, so please help him!

Each test contains multiple test cases. The first line contains the number of test cases tt (1t1041 \le t \le 10^4). The description of the test cases follows.

The first line of each test case contains a single integer nn (2n1062 \le n \le 10^6) — the length of the sequence aa.

It is guaranteed that the sum of nn over all test cases does not exceed 10610^6.

For each test case, output nn integers a1,a2,,ana_1, a_2, \ldots, a_n — the elements of the sequence aa.

If there are multiple answers, print any of them.

Input

Each test contains multiple test cases. The first line contains the number of test cases tt (1t1041 \le t \le 10^4). The description of the test cases follows.

The first line of each test case contains a single integer nn (2n1062 \le n \le 10^6) — the length of the sequence aa.

It is guaranteed that the sum of nn over all test cases does not exceed 10610^6.

Output

For each test case, output nn integers a1,a2,,ana_1, a_2, \ldots, a_n — the elements of the sequence aa.

If there are multiple answers, print any of them.

Sample Input 1

3
2
3
4

Sample Output 1

114514 114514
1 2 2
3 3 4 4

Note

In the third test case, a=[3,4,2,6]a = [3, 4, 2, 6] violates the second condition since a1a2=a3a4a_1 \cdot a_2 = a_3 \cdot a_4. a=[2,3,4,4]a = [2, 3, 4, 4] satisfy the conditions but its number of distinct elements isn't minimum.