#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if ((n / 2) % 2 != 0) {
      cout << "No";
    } else {
      cout << "YES" << endl;
      long long m = n / 2;
      for (long long i = 1; i <= m; i++) {
        cout << 2 * i << " ";
      }
      m = m / 2;
      for (long long i = 1; i <= m; i++) {
        cout << 2 * i - 1 << " ";
      }
      for (long long i = m + 1; i <= n / 2; i++) {
        cout << 2 * i + 1 << " ";
      }
    }
    cout << endl;
  }
}
