{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\u003cb\u003eIt is preferrable to read the pdf statment.\u003c/b\u003e\u003cbr\u003e\u003cbr\u003eIf the world is a hexagon, I will take as many turns as possible before reaching the end.\u003cbr\u003e\u003cbr\u003eCuber QQ has constructed a hexagon grid with radius $n$. This will be better if explained in a picture. For example, this is a hexagon grid with radius $3$:\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/aaef46a0eb364b97d8cd9473f4935247?v\u003d1718791328\"\u003e\u003c/center\u003e\u003cbr\u003e\u003cbr\u003eHe 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:\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/1c2885bb37a7b87b9b272ce4e15d9796?v\u003d1718791328\"\u003e\u003c/center\u003e\u003cbr\u003e\u003cbr\u003eOf course, if you are on the boundary, you cannot move outside of the hexagon.\u003cbr\u003e\u003cbr\u003eLet $D(x,y)$ denote the direction from cell $x$ to $y$, and sequence $A$ denotes your route, in which $A_i$ denotes the $i$-th cell you visit. For index $i$ ($1 \u0026lt; i \u0026lt; |A|$), if $D(A_{i-1},A_i) \\ne D(A_i,A_{i+1})$, we say there is a \u003cb\u003eturning\u003c/b\u003e on cell $i$. \u003cbr\u003e\u003cbr\u003eMaximize the number of turning while ensuring that each cell is visited exactly once. Print your route. If there are multiple solution, print any.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input contains a single integer $T$ ($1\\le T\\le 10^4$), denoting the number of test cases.\u003cbr\u003e\u003cbr\u003eEach of the next $T$ cases:\u003cbr\u003e\u003cbr\u003eThe first line contains an integer $n$ ($2\\le n\\le 500$).\u003cbr\u003e\u003cbr\u003eIt is guaranteed that the sum of $n$ doesn\u0027t exceed $2 \\cdot 10^4$."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output one line contains a string with $3(n-1)n$ characters. The $i$-th character is $D(A_i,A_{i+1})$.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e313456\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}