#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int64_t testcnt;
  int64_t tmp;
  cin >> testcnt;
  vector<int64_t> N(testcnt);
  for (int i = 0; i < testcnt; i++) {
    cin >> N[i];
  }
  for (int i = 0; i < testcnt; i++) {
    if ((N[i] / 2) % 2) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      for (int j = 0; j < N[i] / 2; j++) {
        cout << ((j + 1) * 2) << " ";
      }
      for (int j = 1; j < N[i] / 2; j++) {
        cout << (j * 2) - 1 << " ";
      }
      cout << (N[i] - 1) + (N[i] / 2) << "\n";
    }
  }
  return 0;
}
