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

#define int long long

const long double PI = 3.14159265359;

const int MOD = 1e9 + 7;

void solve()
{
    int n;
    cin >> n;
    if (n <= 3)
        cout << -1 << '\n';
    else
    {
        if (n % 2 == 0)
        {
            for (int i = n; i >= 1; i--)
                cout << i << ' ';
            cout << '\n';
        }
        else
        {
            for (int i = n - 1; i >= 1; i--)
                cout << i << ' ';
            cout << n << '\n';
        }
    }
}

signed main(void)
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    if (fopen("input.txt", "r"))
    {
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    }
    int t = 1;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}