#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n < 4) {
      cout << -1 << endl;
    } else {
      if (n % 2 == 0) {
        x = n - 1;
        n = n + 1;
      } else
        x = n;
      while (x > 0) {
        cout << x << " ";
        x -= 2;
      }
      cout << "4 2 ";
      x = 6;
      while (x < n) {
        cout << x << " ";
        x += 2;
      }
      cout << endl;
    }
  }
  return 0;
}
