#include <bits/stdc++.h>
using namespace std;
const int INF = 987654321;
const int MOD = 1000000007;
map<int, bool> booleanMap;
map<int, int> integerMap;
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    ;
    if (n % 4 == 0) {
      cout << "YES\n";
      ;
      for (long long i = 1; i <= n / 2; i++) {
        cout << i * 2 << " ";
      }
      for (long long i = 1; i < n / 2; i++) {
        cout << i * 2 - 1 << " ";
      }
      cout << n + n / 2 - 1 << endl;
    } else {
      cout << "NO\n";
      ;
    }
  }
  return 0;
}
