#P7851. Hexagon

Hexagon

Hexagon

Problem Description

It is preferrable to read the pdf statment. If the world is a hexagon, I will take as many turns as possible before reaching the end. Cuber QQ has constructed a hexagon grid with radius nn. This will be better if explained in a picture. For example, this is a hexagon grid with radius 33: 图片 He challenges you take a perfect tour over the hexagon, that is to visit each cell exactly once. Starting from any point in the grid, you can move to any adjacent cell in each step. There are six different directions you can choose from: 图片 Of course, if you are on the boundary, you cannot move outside of the hexagon. Let D(x,y)D(x,y) denote the direction from cell xx to yy, and sequence AA denotes your route, in which AiA_i denotes the ii-th cell you visit. For index ii (1<i<A1 < i < |A|), if D(Ai1,Ai)D(Ai,Ai+1)D(A_{i-1},A_i) \ne D(A_i,A_{i+1}), we say there is a turning on cell ii. Maximize the number of turning while ensuring that each cell is visited exactly once. Print your route. If there are multiple solution, print any.

Input

The first line of the input contains a single integer TT (1T1041\le T\le 10^4), denoting the number of test cases. Each of the next TT cases: The first line contains an integer nn (2n5002\le n\le 500). It is guaranteed that the sum of nn doesn't exceed 21042 \cdot 10^4.

Output

For each test case, output one line contains a string with 3(n1)n3(n-1)n characters. The ii-th character is D(Ai,Ai+1)D(A_i,A_{i+1}).

Sample Input

1
2

Sample Output

313456

Source

2020 Multi-University Training Contest 8