#include <bits/stdc++.h>
using namespace std;
int const N = 2e5 + 5;
long long a[N];
set<long long> st;
void solve() {
  st.clear();
  int n;
  cin >> n;
  int x = n / 2;
  if (x & 1) {
    cout << "NO" << endl;
    return;
  }
  long long frst = 1;
  st.insert(frst);
  long long ev = 2;
  for (int i = 0; i < x; i += 2) {
    long long sum = ev;
    a[i] = ev;
    ev += 2;
    a[i + 1] = ev;
    sum += ev;
    ev += 2;
    a[x + i] = frst;
    a[x + i + 1] = sum - frst;
    st.insert(frst);
    st.insert(sum - frst);
    while (1) {
      frst += 2;
      if (!st.count(frst)) break;
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
