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