import java.util.Arrays;
import java.util.Scanner;

public class Solution{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            int mas = sc.nextInt();
            int[] array = new int[mas];
            if (mas / 2 % 2 == 1) {
                System.out.println("NO");
            }
            else {
                System.out.println("YES");
                for (int j = 0; mas / 2 > j; j++) {
                    array[j] = (j + 1) * 2;
                    if (j + 1 == mas / 2) {
                        array[j + mas / 2] = (j + 1) * 2 + mas / 2 - 1;
                    }
                    else {
                        array[j + mas / 2] = (j + 1) * 2 - 1;
                    }
                }
            }
            System.out.println(Arrays.toString(array).replace("[","").replace(",", "").replace("]", ""));
        }
    }
}