#include <bits/stdc++.h>
using namespace std;
const int N = 1e18;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<int> v1, v2;
    int x = 2, y = 1;
    int sum1 = 0, sum2 = 0;
    for (int i = 0; i < (n / 2); i++) {
      v1.push_back(x);
      sum1 += x;
      x = x + 2;
    }
    for (int i = 0; i < (n / 2); i++) {
      sum2 += y;
      v2.push_back(y);
      y = y + 2;
    }
    v2[v2.size() - 1] += sum1 - sum2;
    if (v2[v2.size() - 1] % 2 != 0) {
      cout << "YES" << endl;
      for (int i = 0; i < v1.size(); i++) cout << v1[i] << " ";
      for (int i = 0; i < v2.size(); i++) cout << v2[i] << " ";
      cout << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
