#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
using namespace std;
void solve() {
  long long n;
  cin >> n;
  if ((n / 2) % 2 != 0) {
    cout << "NO"
         << "\n";
  } else {
    cout << "YES"
         << "\n";
    long long j = 2;
    for (long long i = 1; i <= n / 2; i++) {
      cout << j << " ";
      j += 2;
    }
    long long val = j - 2;
    j = 1;
    for (long long i = 1; i < n / 2; i++) {
      cout << j << " ";
      j += 2;
    }
    cout << val + ((n / 2) - 1) << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
