#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    long long x;
    cin >> x;
    if ((x / 2) % 2 != 0) {
      cout << "NO" << endl;
      continue;
    } else {
      long long last = 2;
      cout << "YES" << endl;
      for (long long i = 0; i < x / 2; i++) {
        cout << last << " ";
        last = last + 2;
      }
      last = 1;
      long long sum = 0;
      for (long long i = 0; i < x / 2 - 1; i++) {
        cout << last << " ";
        sum = sum + last;
        last = last + 2;
      }
      x = x / 2;
      cout << x * (x + 1) - sum << endl;
    }
  }
}
