#include <bits/stdc++.h>
using namespace std;

// Macros for convenience
#define ll long long
#define ull unsigned long long
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>

typedef vector<ll> vl;
typedef pair<ll, ll> pl;

// Constants
const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll LINF = 1e18;

// Fast input/output
void fast_io()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

// Utility functions
template <typename T>
void print_vector(const vector<T> &v)
{
    for (const T &x : v)
    {
        cout << x << " ";
    }
    cout << "\n";
}

ll mod_exp(ll base, ll exp, ll mod = MOD)
{
    ll res = 1;
    while (exp > 0)
    {
        if (exp % 2 == 1)
            res = (res * base) % mod;
        base = (base * base) % mod;
        exp /= 2;
    }
    return res;
}

ll gcd(ll a, ll b)
{
    while (b)
    {
        a %= b;
        swap(a, b);
    }
    return a;
}

ll lcm(ll a, ll b)
{
    return (a / gcd(a, b)) * b;
}


bool isPrime(ll n) {
    // Handle edge cases
    if (n <= 1) return false;
    if (n <= 3) return true;
    if (n % 2 == 0 || n % 3 == 0) return false;

    // Check for factors from 5 to sqrt(n)
    for (ll i = 5; i <= sqrtl(n); i += 6) {
        if (n % i == 0 || n % (i + 2) == 0) {
            return false;
        }
    }
    return true;
}


ll modInverse(ll a, ll m) {
    return mod_exp(a, m - 2, m);
}


void GcdOne(ll &p, ll &q) {
    
        // If gcd(p, q) == 1, divide both p and q by their gcd
        ll g = gcd(p, q);
        p /= g;
        q /= g;
    
}

bool isPalindrome(const string& str) {

   string cleaned_str;
    string reversed_str = cleaned_str;
    reverse(reversed_str.begin(), reversed_str.end());
    
    return cleaned_str == reversed_str;
}



// Solution function
void solve()
{
   int n;
   cin>>n;
   if(n<=4)cout<<-1<<endl;
   else{
   	for(int i=1;i<=n;i+=2){
   		if(i!=5){
   			cout<<i<<" ";
   		}
   	}
   	cout<<5<<" "<<4<<" ";
   	for(int i=2;i<=n;i+=2){
   		if(i!=4)cout<<i<<" ";
   		
   	}
   	cout<<'\n';
   }
   
}

// Main function
int main()
{
    fast_io();

    int t;
    cin >> t;
    while (t--)
    {

        solve();
    }

    return 0;
}
