#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, sume = 0, sumo = 0, count = 0;
    scanf("%d", &n);
    int k = n / 2;
    if (k % 2 == 0) {
      printf("YES\n");
      for (int i = 2; count < k; i += 2) {
        sume += i;
        count++;
        printf("%d ", i);
      }
      count = 0;
      for (int i = 1; count < k - 1; i += 2) {
        sumo += i;
        printf("%d ", i);
        count++;
      }
      printf("%d\n", sume - sumo);
    } else {
      printf("NO\n");
    }
  }
}
