#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long k;
    vector<long long> ans;
    if (n > 3) {
      if (n % 2 == 1)
        k = n - 1;
      else
        k = n;
      while (k > 0) {
        if (k == 4) ans.push_back(2);
        if (k == 2) ans.push_back(4);
        if (k != 4 && k != 2) ans.push_back(k);
        k -= 2;
      }
      k = 1;
      while (k <= n) {
        ans.push_back(k);
        k += 2;
      }
      for (auto u : ans) cout << u << " ";
      cout << endl;
    } else {
      cout << "-1" << endl;
    }
  }
  return 0;
}
