#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    if ((n / 2) % 2)
      cout << "NO" << endl;
    else {
      n = n / 2;
      cout << "YES" << endl;
      for (int i = 1; i <= n; i++) cout << 2 * i << ' ';
      for (int i = 1; i < n; i++) cout << 2 * i - 1 << ' ';
      cout << 2 * n - 1 + n;
      cout << endl;
    }
  }
  return 0;
}
