#include <bits/stdc++.h>
using namespace std;
int n;
void solve() {
  cin >> n;
  if (n == 2 || n == 3) {
    puts("-1");
    return;
  }
  int tmp = n;
  while (n >= 5) {
    cout << n << " ";
    n -= 2;
  }
  if (n == 3) n = 6;
  if (n == 4) n = 5;
  cout << "3 1 4 2 ";
  while (n <= tmp) {
    cout << n << " ";
    n += 2;
  }
  cout << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
