#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 % 2 == 1) {
      for (int i = 1; i <= n; i += 2) cout << i << " ";
    } else {
      for (int i = 2; i <= n; i += 2) cout << i << " ";
    }
    cout << n - 3 << " " << n - 1 << " ";
    for (int i = n - 5; i >= 1; i -= 2) cout << i << " ";
    cout << endl;
  }
  return 0;
}
