## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

## [Solution] Construct An Array CodeChef Solution | CodeChef Problem Solution 2022

Given an integer $N$, construct an array $A$ of length $N$ such that:

• $1\le {A}_{i}\le {10}^{18}$ for all $\left(1\le i\le N\right)$;
• There exists a subsequence of length greater than $1$ such that the gcd of all elements of the subsequence is $i$, for all $1\le i\le N$.
More formally, for all $\left(1\le i\le N\right)$, there exists a subsequence $S$ of array $A$ such that the length of the subsequence is $k\left(2\le k\le N\right)$ and $gcd\left({S}_{1},{S}_{2},\dots ,{S}_{k}\right)=i$.

It can be proven that it is always possible to construct such



$A$ under given constraints. If there exist multiple such arrays, print any.

### Input Format

• The first line of input contains a single integer $T$, denoting the number of test cases. The description of $T$ test cases follow.

• The only line of each test case contains an integer $N$ - the length of the array to be constructed.

### Output Format

For each test case, output a single line containing $N$ space-separated integers, denoting the elements of the array $A$. The ${i}^{th}$ of these $N$ integers is the ${i}^{th}$ element of the array $A$.

If there exist multiple such arrays, print any.

### Constraints

• $1\le T\le {10}^{3}$
• $3\le N\le {10}^{3}$
• Sum of $N$ over all test cases does not exceed