#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    if (n == 2 || n == 3) {
      cout << -1 << endl;
      continue;
    }
    long long int i, a[n], curr = ceil(n / 2.0) * 2 - 1, flag = 0, idx;
    for (i = 0; i < n; i++) {
      a[i] = curr;
      if (curr == 1) flag = 1, curr = 0, idx = i;
      if (flag == 0)
        curr -= 2;
      else
        curr += 2;
    }
    swap(a[idx + 1], a[idx + 2]);
    for (i = 0; i < n; i++) cout << a[i] << " ";
    cout << endl;
  }
}
