#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long mid = n / 2;
    if (mid % 2) {
      cout << "NO"
           << "\n";
      continue;
    }
    long long arr[mid];
    long long brr[mid];
    long long c = 2;
    for (long long i = 0; i < mid; i++) {
      arr[i] = c;
      c += 4;
      brr[i] = arr[i];
    }
    for (long long i = 0; i < mid; i++) {
      if (i % 2 == 0)
        brr[i] -= 1;
      else
        brr[i] += 1;
    }
    cout << "YES"
         << "\n";
    for (long long i = 0; i < mid; i++) cout << arr[i] << " ";
    for (long long i = 0; i < mid; i++) cout << brr[i] << " ";
    cout << "\n";
  }
  return 0;
}
