#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
int main() {
  long long int t, n, x;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n < 4)
      cout << -1 << endl;
    else {
      x = (n % 2) ? n : n - 1;
      for (int i = int(x); i >= int(1); i -= 2) cout << i << " ";
      for (int i = int(4); i <= int(n); i += 2) {
        cout << i << " ";
        if (i == 4) cout << 2 << " ";
      }
      cout << endl;
    }
  }
  return 0;
}
