Operator Precedence

시간 제한1초메모리 제한2048 MB

요약
길이 2n인 0이 아닌 정수 수열을 찾아 곱의 합과 합의 곱이 같아지는 항등식을 만족시킨다.
난이도

보통10점 중 5점

유형
수학, 구현
정답자
아직 제출이 없습니다

문제

Randias is facing his primary school homework:

Find a nonzero integer sequence aa of length 2n2n satisfying

 \begin{alignat*}{26} (&a_1 &\times& &a_2&)&+&(&a_3& &\times& &a_4&)&+& & \ldots & & &+&(&a_{2n-1}& &\times& a_{2n}&)\\ = &a_1 &\times&(&a_2& &+& &a_3&)&\times&(&a_4& &+& a_5)\times& \ldots & \times&(a_{2n-2} &+& &a_{2n-1}&)&\times& a_{2n}&\ne 0\text{.} \end{alignat*} 

In shorter form, ∑_i=1na_2i−1a_2i=a_1a_2n∏_i=2n(a_2i−2+a_2i−1)≠0\sum\limits\_{i=1}^n a\_{2i-1} a\_{2i} = a\_1 a\_{2n} \prod\limits\_{i=2}^{n} (a\_{2i-2} + a\_{2i-1}) \ne 0.

Of course, Randias knows how to solve it. But he wants to give you a test. Can you solve the question above?

입력

Each test contains multiple test cases. The first line contains a single integer tt (1≤t≤1051 \leq t \leq 10^5) denoting the number of test cases.

For each test case, the only line contains a single integer nn (2≤n≤1052 \le n \le 10^5).

It is guaranteed that the sum of nn over all test cases does not exceed 2⋅1052 \cdot 10^5.

출력

For each test case, output one line with 2n2 n integers: a_1,a_2,…,a_2na\_1, a\_2, \ldots, a\_{2n} (1≤∣a_i∣≤10101 \le |a\_i| \le 10^{10}).

It can be shown that the answer always exists.

If there are several possible answers, output any one of them.

예제1

  1. 예제 1

    입력
    3
    2
    3
    4
    
    예상 출력
    1 -3 -3 1
    1 -10 6 6 -10 1
    1 -15 10 -1 -1 10 -15 1