#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  if (n < 4) {
    cout << -1 << '\n';
    return;
  }
  if (n == 4) {
    cout << "3 1 4 2 \n";
    return;
  }
  int odd = n - !(n % 2), even = 6;
  while (odd >= 1) {
    cout << odd << ' ';
    odd -= 2;
  }
  cout << "4 2 ";
  while (even <= n) {
    cout << even << ' ';
    even += 2;
  }
  cout << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
