A permutation $p_1,p_2...p_N$ of $\{1, 2, ..., N\}$ is beautiful if $p_i \& p_{i+1}$ is greater than 0 for every $1 \leq i < N$ . You are given an integer $N$, and your task is toconstruct a beautiful permutation of length $N$ or determine that it's impossible.
Note that $a \& b$ denotes the bitwise AND of $a$ and $b$.
-----Input:-----
First line will contain $T$, number of testcases. Then the testcases follow. 
Each testcase contains a single line of input, an integer $N$.
-----Output:-----
For each test case output $-1$ if there is no suitable permutation of length $N$, otherwise output $N$ integers in a single line which form a beautiful permutation. If there are multiple answers output any of them.
-----Constraints-----
- $1 \leq N \leq 10^5$
- The sum of $N$ over all test cases does not exceed $10^6$
-----Subtasks-----
- 50 points : $1 \leq N,T \leq 9$
- 50 points : Original constraints
-----Sample Input:-----
3
4
3
5
-----Sample Output:-----
-1
1 3 2
2 3 1 5 4
import math
t=int(input())
for _ in range(t):
 n=int(input())
 k=math.log(n,2)
 if k==int(k):
  print(-1)
 else:
  li=[(x+1) for x in range(n)]
  li[0],li[1],li[2]=2,3,1
  i=3
  while(i<n):
   if li[i]!=2:
    m=math.log(li[i],2)
    if m==int(m):
     li[i],li[i+1]=li[i+1],li[i]
     i+=1
   i+=1 
  for i in range(n):
   print(li[i],end=" ")
  print() 
import math
t=int(input())
for _ in range(t):
 n=int(input())
 k=math.log(n,2)
 if k==int(k):
  print(-1)
 else:
  li=[(x+1) for x in range(n)]
  li[0],li[1],li[2]=2,3,1
  i=3
  while(i<n):
   if li[i]!=2:
    m=math.log(li[i],2)
    if m==int(m):
     li[i],li[i+1]=li[i+1],li[i]
     i+=1
   i+=1 
  for i in range(n):
   print(li[i],end=" ")
  print() 