#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long pow(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * x);
    x = (x * x);
    n >>= 1;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    vector<long long> a;
    long long n;
    cin >> n;
    if (n < 4) {
      cout << -1 << '\n';
      continue;
    }
    if (n & 1) {
      for (long long i = n - 1; i >= 6; i -= 2) a.push_back(i);
      a.push_back(2);
      a.push_back(4);
      for (long long i = 1; i < n + 1; i += 2) a.push_back(i);
    } else {
      for (long long i = n; i >= 6; i -= 2) a.push_back(i);
      a.push_back(2);
      a.push_back(4);
      for (long long i = 1; i < n; i += 2) a.push_back(i);
    }
    for (auto x : a) cout << x << ' ';
    cout << '\n';
  }
  return 0;
}
