#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n <= 3)
      cout << -1 << '\n';
    else {
      if (n & 1) {
        for (long long i = 1; i <= n; i++) {
          if (i & 1) cout << i << " ";
        }
        cout << n - 3 << " " << n - 1 << " ";
        for (long long i = n - 4; i >= 1; i--) {
          if ((i & 1) == 0) cout << i << " ";
        }
        cout << '\n';
      } else {
        for (long long i = 1; i <= n; i++) {
          if ((i & 1) == 0) cout << i << " ";
        }
        cout << n - 3 << " " << n - 1 << " ";
        for (long long i = n - 4; i >= 1; i--) {
          if ((i & 1)) cout << i << " ";
        }
        cout << '\n';
      }
    }
  }
  return 0;
}
