#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long q;
  cin >> q;
  while (q--) {
    long long n;
    cin >> n;
    if (n / 2 % 2 != 0)
      cout << "NO";
    else {
      cout << "YES" << endl;
      vector<long long> v;
      for (int i = 0; i < n / 2; i++) {
        v.push_back(2 * (i + 1));
      }
      for (int i = 0; i < (n / 2) - 1; i++) {
        v.push_back(2 * i + 1);
      }
      v.push_back(3 * (n / 2) - 1);
      for (auto x : v) cout << x << " ";
    }
    cout << endl;
  }
  return 0;
}
