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