#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int tt = 1, n, i, j;
  cin >> tt;
  for (int _ = 1; _ <= tt; _++) {
    cin >> n;
    bool poss = true;
    long long int p = n >> 1;
    if ((3 * p - 1) & 1) {
      cout << "YES"
           << "\n";
      for (i = 2; i <= 2 * p; i += 2) {
        cout << i << ' ';
      }
      for (i = 1; i < 2 * p - 2; i += 2) {
        cout << i << ' ';
      }
      cout << 3 * p - 1 << "\n";
    } else {
      cout << "NO"
           << "\n";
      poss = false;
    }
  }
  return 0;
}
