#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, t, ans = 0, i, a, b, m, x, y;
  cin >> t;
  while (t > 0) {
    cin >> n;
    vector<int> res;
    long long es = 0, os = 0;
    if ((n / 2) % 2 == 0) {
      cout << "YES" << endl;
      for (i = 0; i < n / 2; i++) {
        res.push_back(2 * (i + 1));
        es += 2 * (i + 1);
      }
      for (i = 0; i < n / 2; i++) {
        res.push_back(2 * (i + 1) - 1);
        os += 2 * (i + 1) - 1;
      }
      res[n - 1] += es - os;
      for (i = 0; i < n; i++) cout << res[i] << " ";
      cout << endl;
    } else
      cout << "NO" << endl;
    t--;
  }
}
