#include <bits/stdc++.h>
using namespace std;
void solve() {
  int t;
  cin >> t;
  for (int _ = 0; _ < (t); ++_) {
    int n;
    cin >> n;
    if (n < 4) {
      cout << -1 << "\n";
      continue;
    }
    deque<int> p{3, 1, 4};
    vector<int> nums{2};
    for (int i = 5; i <= n; ++i) {
      nums.push_back(i);
    }
    for (int i = 0; i < (((int)(nums).size())); ++i) {
      if (abs(p.front() - nums[i]) >= 2 && abs(p.front() - nums[i]) <= 4) {
        p.push_front(nums[i]);
      } else {
        p.push_back(nums[i]);
      }
    }
    for (int i = 0; i < (((int)(p).size())); ++i) {
      if (i) {
        cout << ' ';
      }
      cout << p[i];
    }
    cout << "\n";
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
