#include <bits/stdc++.h>
using namespace std;
int n;
void solve(void) {
  scanf("%d", &n);
  if (n <= 3) {
    puts("-1");
    return;
  }
  if (n == 4) {
    puts("3 1 4 2");
    return;
  }
  if (n == 5) {
    puts("3 1 4 2 5");
    return;
  }
  if (n == 6) {
    puts("5 3 6 2 4 1");
    return;
  }
  vector<int> vc;
  for (int i = 1; i <= n; i += 2) vc.push_back(i);
  if (n % 2) {
    int m = n / 2 + 1;
    int t = vc[m - 3];
    vc[m - 3] = vc[m - 2];
    vc[m - 2] = vc[m - 1];
    vc[m - 1] = t;
    for (int each : vc) printf("%d ", each);
    for (int i = n - 1; i >= 2; i -= 2) printf("%d ", i);
    puts("");
  } else {
    int m = n / 2;
    swap(vc[m - 2], vc[m - 1]);
    for (int each : vc) printf("%d ", each);
    for (int i = n; i >= 2; i -= 2) printf("%d ", i);
    puts("");
  }
}
int main(void) {
  int t;
  scanf("%d", &t);
  while (t--) solve();
  return 0;
}
