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