public static void mutate(int[] A, int[] B){
        int len = A.length;
        for(int i = 0; i < len; i++) {
            while (i != B[i]) {
                swap(A, i, B[i]);
                swap(B, i, B[i]);
            }
        }
    }