#include <bits/stdc++.h>
using namespace std;
const int maxn = 8500;
int main() {
  std::ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n <= 3)
      cout << -1 << endl;
    else {
      for (int i = (n % 2 ? n : n - 1); i >= 5; i -= 2) cout << i << " ";
      cout << "3 1 4 2 ";
      for (int i = 6; i <= n; i += 2) cout << i << " ";
      cout << endl;
    }
  }
  return 0;
}
