#C960. Construct the Array

    ID: 53711 Type: Default 1000ms 256MiB

Construct the Array

Construct the Array

Given a positive integer n, construct an array of length n such that for each index i (1 ≤ i ≤ n), the value at that index is the greatest integer that divides the sum of the first i elements. It turns out that the sequence \(A = [1, 2, \ldots, n]\) satisfies this condition.

Formally, let the array be \(A = [a_1, a_2, \ldots, a_n]\). For each \(1 \leq i \leq n\), the condition is defined as:

[ a_i = i ]

Your task is to implement a solution that constructs this array for a given n and to process multiple test cases.

inputFormat

The first line contains an integer T (1 ≤ T ≤ 1000) representing the number of test cases. Each of the following T lines contains a single integer n (1 ≤ n ≤ 1000).

outputFormat

For each test case, output a single line containing the constructed array. The elements of the array should be printed in order and separated by a single space.

## sample
1
1
1