#include <bits/stdc++.h>
using namespace std;
#define int long long int
const int MOD = 1000000007;
void init_code() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
int32_t main() {
//init_code();
int t;
cin >> t;
while (t--) {
int n;
cin>>n;
if(n<=4) {
cout<<-1<<"\n";
} else {
for(int i=1;i<=n;i=i+2) {
if(i==5) {
continue;
} else {
cout<<i<<" ";
}
}
cout<<5<<" "<<4<<" ";
for(int i=2;i<=n;i=i+2) {
if(i==4) {
continue;
} else {
cout<<i<<" ";
}
}
cout<<"\n";
}
//cout<<1<<" "<<n-2<<"\n";
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgaW50IGxvbmcgbG9uZyBpbnQKY29uc3QgaW50IE1PRCA9IDEwMDAwMDAwMDc7Cgp2b2lkIGluaXRfY29kZSgpIHsKI2lmbmRlZiBPTkxJTkVfSlVER0UKICAgIGZyZW9wZW4oImlucHV0LnR4dCIsICJyIiwgc3RkaW4pOwogICAgZnJlb3Blbigib3V0cHV0LnR4dCIsICJ3Iiwgc3Rkb3V0KTsKI2VuZGlmCn0KCmludDMyX3QgbWFpbigpIHsKICAgIC8vaW5pdF9jb2RlKCk7CiAgICBpbnQgdDsKICAgIGNpbiA+PiB0OwogICAgd2hpbGUgKHQtLSkgewogICAgICAgIGludCBuOwogICAgICAgIGNpbj4+bjsKICAgICAgICBpZihuPD00KSB7CiAgICAgICAgICAgIGNvdXQ8PC0xPDwiXG4iOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGZvcihpbnQgaT0xO2k8PW47aT1pKzIpIHsKICAgICAgICAgICAgICAgIGlmKGk9PTUpIHsKICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgY291dDw8aTw8IiAiOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgICBjb3V0PDw1PDwiICI8PDQ8PCIgIjsKICAgICAgICAgICAgZm9yKGludCBpPTI7aTw9bjtpPWkrMikgewogICAgICAgICAgICAgICAgaWYoaT09NCkgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb3V0PDxpPDwiICI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY291dDw8IlxuIjsKICAgICAgICB9CiAgICAgICAgLy9jb3V0PDwxPDwiICI8PG4tMjw8IlxuIjsKICAgIH0KICAgIHJldHVybiAwOwp9