#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 < 4) {
    cout << -1 << "\n";
    return;
  }
  if (n % 2 == 1) {
    for (int i = 1; i <= n; i += 2) {
      cout << i << " ";
    }
    cout << n - 3 << " " << n - 1 << " ";
    if (n > 5) {
      cout << n - 5 << " ";
    }
    for (int i = n - 7; i > 0; i -= 2) {
      cout << i << " ";
    }
    cout << "\n";
  } else {
    for (int i = 2; i <= n; i += 2) {
      cout << i << " ";
    }
    cout << n - 3 << " " << n - 1 << " ";
    if (n > 4) {
      cout << n - 5 << " ";
    }
    for (int i = n - 7; i > 0; i -= 2) {
      cout << i << " ";
    }
    cout << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
