#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> ans;
    if (n < 4)
      cout << -1 << "\n";
    else {
      int i;
      if (n & 1)
        i = n;
      else
        i = n - 1;
      while (i >= 1) {
        ans.push_back(i);
        i -= 2;
      }
      ans.push_back(4);
      ans.push_back(2);
      i = 6;
      while (i <= n) {
        ans.push_back(i);
        i += 2;
      }
      for (auto i : ans) cout << i << " ";
      cout << "\n";
    }
  }
  return 0;
}
