CF2231A Construct an Array

Description

You are given an integer $ n $ . You need to construct an array of integers $ a_1, a_2, \ldots, a_n $ such that the following conditions are satisfied: - $ 1 \leq a_i \leq 2 \cdot n $ for all $ i $ from $ 1 $ to $ n $ . - All elements of the array and the sums of adjacent elements are pairwise distinct. In other words, among the numbers $ \{a_1, a_2, \ldots, a_n, a_1 + a_2, a_2 + a_3, \ldots, a_{n - 1} + a_n\} $ , there should not be two equal numbers.

Input Format

Each test contains multiple test cases. The first line contains the number of test cases $ t $ ( $ 1 \le t \le 100 $ ). The description of the test cases follows. The only line of each test case contains one integer $ n $ ( $ 1 \le n \le 500 $ ).

Output Format

For each test case, output an array of length $ n $ that satisfies the condition of the problem. It can be shown that such an array always exists under the given constraints.

Explanation/Hint

In the second example, all elements and adjacent sums form the set $ \textbf{6}, \textbf{2}, \textbf{3}, 8, 5 $ , all of whose elements are distinct. In the third example, all elements and adjacent sums form the set $ \textbf{8}, \textbf{1}, \textbf{11}, \textbf{2}, \textbf{3}, \textbf{4}, 9, 12, 13, 5, 7 $ , whose elements are also distinct.