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