#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if ((n / 2) % 2 != 0)
      cout << "NO" << endl;
    else {
      int z;
      cout << "YES" << endl;
      for (int i = 1; i <= n / 2; i++) {
        z = i;
        cout << 2 * i << " ";
      }
      for (int i = 0; i < n / 2 - 1; i++) cout << 2 * i + 1 << " ";
      cout << z * 2 + n / 2 - 1 << endl;
    }
  }
  return 0;
}
