#include <bits/stdc++.h>
using namespace std;
void test_case() {
  long long int n;
  cin >> n;
  if (n < 4) {
    cout << -1 << endl;
  } else {
    vector<long long int> v;
    if (n % 2 == 1) {
      for (long long int i = 0; i <= n / 2; i++) {
        v.push_back(n - 2 * i);
      }
      v.push_back(4);
      v.push_back(2);
      for (long long int i = 6; i < n; i += 2) {
        v.push_back(i);
      }
    } else {
      for (long long int i = 0; i < n / 2; i++) {
        v.push_back(n - 2 * i - 1);
      }
      v.push_back(4);
      v.push_back(2);
      for (long long int i = 6; i <= n; i += 2) {
        v.push_back(i);
      }
    }
    for (long long int i = 0; i < n; i++) {
      cout << v[i] << " ";
    }
    cout << endl;
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) test_case();
  return 0;
}
