#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 50;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n % 4 != 0) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    n /= 2;
    for (int i = 1; i <= n; i++) cout << 2 * i << " ";
    for (int i = 1; i <= n - 1; i++) cout << 2 * i - 1 << " ";
    cout << 3 * n - 1 << endl;
  }
  return 0;
}
