#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n <= 3) {
      cout << -1 << endl;
      continue;
    }
    if (n == 4) {
      cout << 2 << " " << 4 << " " << 1 << " " << 3 << endl;
      continue;
    }
    vector<long long> v;
    for (long long i = 1; i <= n; i += 2) cout << i << " ";
    for (long long i = 2; i <= n; i += 2) v.push_back(i);
    if (n & 1)
      swap(v[v.size() - 2], v[v.size() - 1]);
    else {
      v.push_back(v[v.size() - 3]);
      v[v.size() - 4] = -1;
    }
    for (long long i = v.size() - 1; i >= 0; i--)
      if (v[i] != -1) cout << v[i] << " ";
    cout << endl;
  }
}
