#include <bits/stdc++.h>
using namespace std;
long long bigmod(long long b, long long p, long long md) {
  if (p == 0) return 1;
  if (p % 2 == 1) {
    return ((b % md) * bigmod(b, p - 1, md)) % md;
  } else {
    long long y = bigmod(b, p / 2, md);
    return (y * y) % md;
  }
}
bool vis[1000002];
vector<long long> adj[1000002];
long long depth[1000002];
long long parent[1000002][18];
long long a[8050], b[8050];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n < 4) {
      cout << -1 << endl;
      continue;
    }
    vector<int> ans;
    if (n & 1) {
      int cnt = 0;
      for (int i = n; i >= 1; i -= 2) {
        ans.push_back(i);
        cnt++;
      }
      for (int i = 2; i < n; i += 2) {
        ans.push_back(i);
      }
      swap(ans[cnt], ans[cnt + 1]);
      for (auto i : ans) cout << i << " ";
      cout << endl;
    } else {
      int cnt = 0;
      for (int i = n - 1; i >= 1; i -= 2) {
        ans.push_back(i);
        cnt++;
      }
      for (int i = 2; i <= n; i += 2) {
        ans.push_back(i);
      }
      swap(ans[cnt], ans[cnt + 1]);
      for (auto i : ans) cout << i << " ";
      cout << endl;
    }
  }
  return 0;
}
