| Insomnia-26 |
|---|
| Finished |
In the ancient kingdom of Insomnia, the Royal Mathematician has discovered a strange and powerful sequence known as the Resonating Array. It is said that such an array holds the key to unlocking the kingdom's greatest secrets — but only if it is constructed correctly. The rule is simple yet mysterious.
For every pair of consecutive elements in the array, the remainder when the first element is divided by the second must be exactly $$$1$$$.
Formally, if the array is $$$a_1, a_2, \dots, a_n$$$, then for every $$$1 \le i \lt n$$$, we must have $$$a_i \bmod a_{i+1} = 1$$$.
The king has requested the lexicographically smallest$$$^{\text{∗}}$$$ such array of length $$$n$$$, using positive integers.
Can you help the Royal Mathematician find it before the kingdom falls into chaos?
$$$^{\text{∗}}$$$An array $$$a$$$ is lexicographically smaller than array $$$b$$$ if there exists an index $$$i$$$ such that $$$a_j=b_j$$$ for all indices $$$1≤j \lt i$$$ and $$$a_i \lt b_i$$$.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases.
Each test case consists of a single integer $$$n$$$ ($$$1 \le n \le 5 \cdot 10^5$$$) — the length of the array.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$5 \cdot 10^5$$$.
For each test case, print $$$n$$$ positive integers $$$a_1, a_2, \dots, a_n$$$ — the lexicographically smallest array such that for every $$$1 \le i \lt n$$$: $$$a_i \bmod a_{i+1} = 1$$$.
2 1 2
1 1 2
| Name |
|---|


