#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    int z;
    cin >> n;
    z = n / 2;
    int i;
    int t = 0;
    int l = 0;
    if (z % 2 != 0) {
      cout << "NO"
           << "\n";
    } else {
      cout << "YES"
           << "\n";
      for (i = 2; t < z; i = i + 4) {
        t = t + 1;
        cout << i << " ";
      }
      for (i = 2; l < z; i = i + 4) {
        l = l + 1;
        cout << i + pow(-1, l) << " ";
      }
      cout << "\n";
    }
  }
  return 0;
}
