#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 1e3 + 100;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
inline long long dpow(long long a, long long b) {
  long long r = 1, t = a;
  while (b) {
    if (b & 1) r = (r * t) % MOD;
    b >>= 1;
    t = (t * t) % MOD;
  }
  return r;
}
inline long long fpow(long long a, long long b) {
  long long r = 1, t = a;
  while (b) {
    if (b & 1) r = (r * t);
    b >>= 1;
    t = (t * t);
  }
  return r;
}
vector<int> v;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n;
    scanf("%d", &n);
    v.clear();
    if (n < 4)
      printf("-1\n");
    else {
      int j = 1;
      while (j <= n) v.push_back(j), j += 2;
      j = ((n - 1) / 2 + 1) * 2;
      if (j > n) j -= 2;
      while (j >= 2) v.push_back(j), j -= 2;
      if (n & 1)
        swap(v[(n - 1) / 2 + 1], v[(n - 1) / 2 + 1 + 1]);
      else
        swap(v[n / 2 - 2], v[n / 2 - 1]);
      for (auto it : v) cout << it << " ";
      cout << endl;
    }
  }
  return 0;
}
