#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rng(chrono::steady_clock::now().time_since_epoch().count());
long long int randint(long long int a, long long int b) {
  return uniform_int_distribution<long long int>(a, b)(mt_rng);
}
long long int mod(long long int a, long long int b) {
  long long int ret = a % b;
  return ret >= 0 ? ret : ret + b;
}
void solve() {
  int n;
  cin >> n;
  if (n <= 3) {
    cout << -1 << "\n";
    return;
  }
  if (n % 2 == 0) {
    for (int i = 1; i < (n / 2) + 1; i++) {
      cout << i * 2 << " ";
    }
    cout << n - 3 << " " << n - 1 << " ";
    for (int i = n - 5; i >= 1; i -= 2) {
      cout << i << " ";
    }
    cout << "\n";
    return;
  }
  for (int i = 0; i < (n / 2) + 1; i++) {
    cout << (i * 2) + 1 << " ";
  }
  cout << n - 3 << " " << n - 1 << " ";
  for (int i = n - 5; i >= 1; i -= 2) {
    cout << i << " ";
  }
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
