#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m;
    cin >> n;
    m = n / 2;
    if (m % 2 == 1) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    vector<long long int> even(m), pref(m);
    for (long long int i = 0, num = 2; i < m; i++, num += 2) {
      even[i] = num;
      if (i % 2 == 1) pref[i] = even[i] + even[i - 1];
    }
    set<long long int> u;
    vector<long long int> odd(m);
    for (long long int i = 1; i < m; i += 2) {
      long long int temp = pref[i];
      temp /= 2;
      long long int a = temp - 2, b = temp + 2;
      while (u.count(a) || u.count(b)) {
        a -= 2;
        b += 2;
      }
      odd[i - 1] = a;
      odd[i] = b;
      u.insert(a);
      u.insert(b);
    }
    for (long long int i = 0; i < m; i++) cout << even[i] << " ";
    for (long long int i = 0; i < m; i++) cout << odd[i] << " ";
    cout << "\n";
  }
  return 0;
}
