#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" << '\n';
    } else {
      cout << "YES" << '\n';
      vector<int> v;
      int x = 2, sum = 0;
      for (int i = 0; i < n / 2; ++i) {
        v.push_back(x);
        sum += x;
        x = x + 2;
      }
      int count = 0;
      x = 1;
      while (count != (n / 2)) {
        v.push_back(x);
        count++;
        if ((sum - x) % 2 != 0 && count == ((n / 2) - 1)) {
          v.push_back(sum - x);
          break;
        }
        sum -= x;
        x += 2;
      }
      for (int i = 0; i < v.size(); ++i) {
        cout << v[i] << " ";
      }
      cout << '\n';
    }
  }
}
