#include <bits/stdc++.h>
using namespace std;
int main() {
  int tstst;
  cin >> tstst;
  for (int tst = 0; tst < (int)(tstst); tst++) {
    int n;
    cin >> n;
    if (n % 4 != 0) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      int d = n / 2;
      for (int i = 0; i < (int)(d); i++) {
        cout << 2 * (i + 1) << " ";
      }
      for (int i = 0; i < (int)(d - 1); i++) {
        cout << 2 * i + 1 << " ";
      }
      cout << 3 * d - 1 << " " << '\n';
    }
  }
}
