#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 != 0) {
      cout << "NO" << endl;
    } else {
      n = n / 2;
      if (n % 2 != 0) {
        cout << "NO" << endl;
      } else {
        cout << "YES" << endl;
        long long int i;
        vector<long long int> v;
        long long int p = 2;
        for (i = 0; i < n; i++) {
          cout << p << " ";
          v.push_back(p);
          p = p + 4;
        }
        int f = 0;
        for (i = 0; i < n; i++) {
          if (f == 0) {
            cout << v[i] - 1 << " ";
            f = 1;
          } else {
            cout << v[i] + 1 << " ";
            f = 0;
          }
        }
        cout << endl;
      }
    }
  }
}
