#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 2 || n == 3) {
      cout << -1 << endl;
      continue;
    }
    if (n == 1) {
      cout << 1 << endl;
      continue;
    }
    if (n % 2) {
      for (int i = n; i >= 1; i -= 2) {
        cout << i << ' ';
      }
      cout << 4 << ' ';
      for (int i = 2; i < n; i += 2) {
        if (i == 4)
          continue;
        else
          cout << i << ' ';
      }
    } else {
      for (int i = n - 1; i >= 1; i -= 2) {
        cout << i << ' ';
      }
      cout << 4 << ' ';
      for (int i = 2; i <= n; i += 2) {
        if (i == 4)
          continue;
        else
          cout << i << ' ';
      }
    }
    cout << endl;
  }
}
