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