{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eThe famous traveler BaoBao is visiting the Dream Kingdom now. There are $n$ cities in Dream Kingdom, numbered from $1$ to $n$. The cities are connected by \u003cb\u003edirected\u003c/b\u003e roads. For all $1 \\le i \\le n$:\r\n\r\n\u003c/p\u003e\u003cul\u003e\r\n \u003cli\u003eThere is a road from the $i$-th city to the $(i-1)$-th city if $1 \\le i-1 \\le n$.\u003c/li\u003e\r\n \u003cli\u003eThere is a road from the $i$-th city to the $2i$-th city if $1 \\le 2i \\le n$.\u003c/li\u003e\r\n \u003cli\u003eThere is a road from the $i$-th city to the $(2i+1)$-th city if $1 \\le 2i+1 \\le n$.\u003c/li\u003e\r\n \u003cli\u003eThere is a road from the $i$-th city to the $\\lfloor \\frac{i}{2} \\rfloor$-th city if $1 \\le \\lfloor \\frac{i}{2} \\rfloor \\le n$, where $\\lfloor \\frac{i}{2} \\rfloor$ indicates the largest integer $x$ such that $2x \\le i$.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003e\u003c/p\u003e\r\n\r\n\u003cp\u003eBaoBao starts his travel from the 1st city. As he doesn\u0027t like visiting a city more than once, he wants to find a route which goes through each of the $n$ cities exactly once. Can you help him find such a route?\u003c/p\u003e\r\n\r\n\u003ch4\u003eInput\u003c/h4\u003e\r\n\u003cp\u003eThere are multiple test cases. The first line of the input contains an integer $T$, indicating the number of test cases. For each test case:\u003c/p\u003e\r\n\r\n\u003cp\u003eThe first and the only line contains an integer $n$ ($1 \\le n \\le 10^5$), indicating the number of cities in Dream Kingdom.\u003c/p\u003e\r\n\r\n\u003cp\u003eIt\u0027s guaranteed that the sum of $n$ of all test cases will not exceed $10^6$.\u003c/p\u003e\r\n\r\n\u003ch4\u003eOutput\u003c/h4\u003e\r\n\u003cp\u003eFor each test case output one line. If there exists a route which starts from the 1st city and visits each city exactly once, output $n$ integers $c_1, c_2, \\dots, c_n$ separated by a space, where $c_i$ indicates the $i$-th city in the route (note that according to the description, there must be $c_1 \u003d 1$). If there is no valid route, output \"-1\" (without quotes) instead. If there are multiple valid answers, you can output any of them.\u003c/p\u003e\r\n\r\n\u003cp\u003ePlease, DO NOT output extra spaces at the end of each line, or your solution may be considered incorrect!\u003c/p\u003e\r\n\r\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\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\u003e2\r\n2\r\n9\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 2\r\n1 3 6 5 2 4 9 8 7\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n"}}]}