#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const int SZ = 1200;
const int Q = 2e5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n % 4 != 0) {
      cout << "NO" << '\n';
    } else {
      cout << "YES" << '\n';
      for (int i = 1; i < (n / 2) + 1; i++) cout << 2 * i << " ";
      for (int i = 0; i < (n / 2) - 1; i++) cout << (2 * i + 1) << " ";
      cout << (long long)n - 1 + n / 2 << '\n';
    }
  }
  return 0;
}
