#include <bits/stdc++.h>
using namespace std;
int setup() { return 0; }
const double pi = acos(-1.0);
int main() {
  int errorInSetup = setup();
  if (errorInSetup) exit(errorInSetup);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if ((n / 2) & 1) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      for (i = 1; i <= n / 2; ++i) {
        cout << i * 2 << " ";
      }
      for (i = 1; i < n / 2; ++i) {
        cout << i * 2 - 1 << " ";
      }
      cout << n + (n / 2) - 1 << "\n";
    }
  }
  return 0;
}
