#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, unsigned long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) {
      res = res * x;
    }
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long int powermod(long long int x, unsigned long long int y,
                       long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % p;
    }
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int32_t main() {
  long long int T;
  cin >> T;
  vector<long long int> odd, even;
  while (T--) {
    long long int n;
    cin >> n;
    for (long long int i = (long long int)(1); i < (long long int)(n + 1);
         i++) {
      if (i % 2 == 0)
        even.push_back(i);
      else
        odd.push_back(i);
    }
    if (n <= 3) {
      cout << "-1\n";
      odd.clear();
      even.clear();
      continue;
    }
    sort((odd).begin(), (odd).end(), greater<long long int>());
    sort((even).begin(), (even).end());
    swap(even[0], even[1]);
    for (long long int i = (long long int)(0); i < (long long int)(odd.size());
         i++) {
      cout << odd[i] << " ";
    }
    for (long long int i = (long long int)(0); i < (long long int)(even.size());
         i++) {
      cout << even[i] << " ";
    }
    cout << "\n";
    odd.clear();
    even.clear();
  }
  return 0;
}
