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