#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
const long long maxn = 1e5 + 1;
const long long inf = LLONG_MAX;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, n;
  cin >> t;
  while (t--) {
    long long cnt = 0;
    cin >> n;
    n /= 2;
    vector<long long> odds, evens;
    if (n & 1)
      cout << "NO"
           << "\n";
    else {
      cout << "YES"
           << "\n";
      for (long long i = 3;; i += 8) {
        evens.push_back(i - 1);
        evens.push_back(i + 1);
        odds.push_back(i - 2);
        odds.push_back(i + 2);
        cnt += 2;
        if (cnt == n) break;
      }
      for (auto x : evens) cout << x << " ";
      for (auto x : odds) cout << x << " ";
      cout << "\n";
    }
  }
  return 0;
}
