t = input()
t = int(t)
while t:
t -= 1
n = int(input())
n = list(range(1,n+1))
middle = len(n)//2
left = n[:middle]
right = n[middle:]
left = list(reversed(left))
if len(n)==3:
print(-1)
else:
print(*(right+left))
#include <bits/stdc++.h>
using namespace std;
int main()
{
#define int long long int
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
if (n == 3)
cout << -1 << endl;
else if (n % 2 == 1)
{
for (int i = n; i > (n / 2) + 1; i--)
{
cout << i << " ";
}
for (int i = 1; i <=( n / 2)+1 ; i++)
{
cout << i << " ";
}
cout << endl;
}
else
for (int i = n; i >= 1; i--)
{
cout << i << " ";
}
cout << endl;
}
return 0;
}
Back to School | I am Easy |
Teddy and Tweety | Partitioning binary strings |
Special sets | Smallest chosen word |
Going to office | Color the boxes |
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |
Duration | Birthday Party |