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