#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if ((n / 2) % 2 == 0) {
      cout << "YES" << endl;
      int i = 2;
      int j = 0;
      long long sum1 = 0;
      while (j < (n / 2)) {
        cout << i << " ";
        sum1 += i;
        i += 2;
        j++;
      }
      i = 1;
      j = 0;
      long long sum2 = 0;
      while (j < (n / 2 - 1)) {
        sum2 += i;
        cout << i << " ";
        i += 2;
        j++;
      }
      cout << sum1 - sum2 << " " << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
