#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long qpow(long long a, long long b, long long m) {
  long long r = 1;
  a %= m;
  for (; b; b >>= 1) {
    if (b & 1) r = r * a % m;
    a = a * a % m;
  }
  return r;
}
const int inf = 0x7fffffff;
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    if (n == 2 || n == 3)
      cout << -1 << endl;
    else {
      if (n & 1) {
        for (int i = 1; i <= n; i += 2) {
          if (i - 1) cout << " ";
          cout << i;
        }
        cout << " " << n - 3 << " " << n - 1;
        for (int i = n - 5; i >= 1; i -= 2) cout << " " << i;
        cout << endl;
      } else {
        for (int i = n - 1; i >= 1; i -= 2) {
          if (i != n - 1) cout << " ";
          cout << i;
        }
        cout << " " << 4 << " " << 2;
        for (int i = 6; i <= n; i += 2) cout << " " << i;
        cout << endl;
      }
    }
  }
  return 0;
}
