#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int maxn = 200005;
const int mod = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n <= 3) {
      cout << -1 << '\n';
    } else {
      if (n & 1) {
        for (int i = 1; i <= n; i += 2) {
          cout << i << ' ';
        }
        cout << n - 3 << ' ' << n - 1 << ' ';
        for (int i = n - 5; i >= 1; i -= 2) {
          cout << i << ' ';
        }
        cout << '\n';
      } 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 << '\n';
      }
    }
  }
}
