#include <bits/stdc++.h>
using namespace std;
long long t, i, j, a[10000], s = 0, n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> t;
  for (i = 1; i <= t; i++) {
    cin >> n;
    if (n % 4 == 0) {
      cout << "YES"
           << "\n";
      for (j = 1; j <= n / 2; j++) {
        cout << j * 2 << " ";
      }
      for (j = 1; j < n / 2; j++) {
        cout << j * 2 - 1 << " ";
      }
      cout << j + n - 1;
    } else {
      cout << "NO";
    }
    cout << "\n";
  }
}
