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