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