#include <bits/stdc++.h>
using namespace std;
int node[100010];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, q;
    cin >> n;
    q = n;
    if ((q / 2) % 2 != 0)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      int sum = 0, j = 0, m, c = n / 2;
      for (int i = 1; i <= n / 2; i++) {
        j += 2;
        cout << j << " ";
        sum += j;
      }
      m = sum;
      for (int i = 1; i <= sum; i += 2) {
        if (c == 1) break;
        if (i != 1) cout << " ";
        m -= i;
        cout << i;
        c--;
      }
      cout << " " << m << endl;
    }
  }
  return 0;
}
