#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    if (n == 1) {
      cout << "1";
    } else if (n == 2) {
      cout << "-1";
    } else if (n == 3) {
      cout << "-1";
    } else {
      long long int d = n;
      if (d % 2 == 0) n--;
      while (n >= 1) {
        cout << n << " ";
        n -= 2;
      }
      cout << "4 2 ";
      long long int p = 6;
      while (p <= d) {
        cout << p << " ";
        p += 2;
      }
    }
    cout << endl;
  }
  return 0;
}
