You are given a table a of size 2 × n (i.e. two rows and n columns) consisting of integers from 1 to n.

In one move, you can choose some column j (1 ≤ j ≤ n) and swap values a_{1, j} and a_{2, j} in it. Each column can be chosen no more than once.

Your task is to find the minimum number of moves required to obtain permutations of size n in both first and second rows of the table or determine if it is impossible to do that.

You have to answer t independent test cases.

Recall that the permutation of size n is such an array of size n that contains each integer from 1 to n exactly once (the order of elements doesn't matter).

Input

The first line of the input contains one integer t (1 ≤ t ≤ 2 ⋅ 10^4) — the number of test cases. Then t test cases follow.

The first line of the test case contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of columns in the table. The second line of the test case contains n integers a_{1, 1}, a_{1, 2}, ..., a_{1, n} (1 ≤ a_{1, i} ≤ n), where a_{1, i} is the i-th element of the first row of the table. The third line of the test case contains n integers a_{2, 1}, a_{2, 2}, ..., a_{2, n} (1 ≤ a_{2, i} ≤ n), where a_{2, i} is the i-th element of the second row of the table.

It is guaranteed that the sum of n does not exceed 2 ⋅ 10^5 (∑ n ≤ 2 ⋅ 10^5).

Output

For each test case print the answer: -1 if it is impossible to obtain permutation of size n in both first and the second rows of the table, or one integer k in the first line, where k is the minimum number of moves required to obtain permutations in both rows, and k distinct integers pos_1, pos_2, ..., pos_k in the second line (1 ≤ pos_i ≤ n) in any order — indices of columns in which you need to swap values to obtain permutations in both rows. If there are several answers, you can print any.

Example

Input


6
4
1 2 3 4
2 3 1 4
5
5 3 5 1 4
1 2 3 2 4
3
1 2 1
3 3 2
4
1 2 2 1
3 4 3 4
4
4 3 1 4
3 2 2 1
3
1 1 2
3 2 2


Output


0

2
2 3 
1
1 
2
3 4 
2
3 4 
-1
import java.io.*;
import java.util.*;
import java.math.*;

public class G {

    public void go() throws IOException {
        int zzz = ipar();
        for (int zz = 0; zz < zzz; zz++) {
            int n = ipar();
            int[] arr1 = iapar(n);
            int[] arr2 = iapar(n);
            int[] freq = new int[n+1];
            for (int x : arr1) {
                freq[x]++;
            }
            for (int x : arr2) {
                freq[x]++;
            }
            boolean works = true;
            for (int i = 1; i <= n; i++) {
                if (freq[i] != 2) {
                    works = false;
                    break;
                }
            }
            if (!works) {
                out.println(-1);
                continue;
            }
            int[] c1 = new int[n+1];
            int[] c2 = new int[n+1];
            int[] r1 = new int[n+1];
            int[] r2 = new int[n+1];
            Arrays.fill(c1, -1);
            Arrays.fill(c2, -1);
            Arrays.fill(r1, -1);
            Arrays.fill(r2, -1);
            for (int i = 0; i < n; i++) {
                if (c1[arr1[i]] == -1) {
                    c1[arr1[i]] = i;
                    r1[arr1[i]] = 1;
                } else {
                    c2[arr1[i]] = i;
                    r2[arr1[i]] = 1;
                }
                if (c1[arr2[i]] == -1) {
                    c1[arr2[i]] = i;
                    r1[arr2[i]] = 2;
                } else {
                    c2[arr2[i]] = i;
                    r2[arr2[i]] = 2;
                }
            }
            Vertex[] vertices = new Vertex[n];
            for (int i = 0; i < n; i++) {
                vertices[i] = new Vertex(i);
            }
            for (int i = 1; i <= n; i++) {
                if (r1[i] == r2[i]) {
                    vertices[c1[i]].others1.add(vertices[c2[i]]);
                    vertices[c2[i]].others1.add(vertices[c1[i]]);
                } else {
                    vertices[c1[i]].others2.add(vertices[c2[i]]);
                    vertices[c2[i]].others2.add(vertices[c1[i]]);
                }
            }
            int comp = 0;
            for (Vertex v : vertices) {
                if (v.color == -1) {
                    dfs(v, 0, comp++);
                }
            }
            int[][] sizes = new int[comp][2];
            for (Vertex v : vertices) {
                sizes[v.comp][v.color]++;
            }
            int count = 0;
            int[] choice = new int[comp];
            for (int i = 0; i < comp; i++) {
                if (sizes[i][0] < sizes[i][1]) {
                    choice[i] = 0;
                } else {
                    choice[i] = 1;
                }
                count += Math.min(sizes[i][0], sizes[i][1]);
            }
            out.println(count);
            for (Vertex v : vertices) {
                if (choice[v.comp] == v.color) {
                    out.print(v.i+1);
                    out.print(" ");
                }
            }
            out.println();
        }
    }

    public void dfs(Vertex curr, int col, int comp) {
        if (curr.color != -1) {
            return;
        }
        curr.color = col;
        curr.comp = comp;
        for (Vertex other : curr.others1) {
            dfs(other, 1-col, comp);
        }
        for (Vertex other : curr.others2) {
            dfs(other, col, comp);
        }
    }

    private class Vertex {
        ArrayList<Vertex> others1 = new ArrayList<>();
        ArrayList<Vertex> others2 = new ArrayList<>();
        int color = -1, comp = -1;
        boolean flip;
        int i;

        public Vertex(int i) {
            this.i = i;
        }
    }

    //////////////////////////////////////////////
    //             DEBUG PROPERTIES             //
    //////////////////////////////////////////////

    static final boolean RUN_TIMING = false;
    static final boolean AUTOFLUSH = false;
    static final boolean FILE_INPUT = false;
    static final boolean FILE_OUTPUT = false;

    ///////////////////////////////////////////
    //             TEMPLATE CODE             //
    ///////////////////////////////////////////

    static char[] inputBuffer = new char[1 << 20];
    static PushbackReader in = new PushbackReader(new BufferedReader(new InputStreamReader(System.in)), 1 << 20);
    static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), AUTOFLUSH);

    public int ipar() throws IOException {
        return Integer.parseInt(spar());
    }

    public int[] iapar(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = ipar();
        }
        return arr;
    }

    public long lpar() throws IOException {
        return Long.parseLong(spar());
    }

    public long[] lapar(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = lpar();
        }
        return arr;
    }

    public double dpar() throws IOException {
        return Double.parseDouble(spar());
    }

    public String spar() throws IOException {
        int len = 0;
        int c;
        do {
            c = in.read();
        } while (Character.isWhitespace(c) && c != -1);
        if (c == -1) {
            throw new NoSuchElementException("Reached EOF");
        }
        do {
            inputBuffer[len] = (char)c;
            len++;
            c = in.read();
        } while (!Character.isWhitespace(c) && c != -1);
        while (c != '\n' && Character.isWhitespace(c) && c != -1) {
            c = in.read();
        }
        if (c != -1 && c != '\n') {
            in.unread(c);
        }
        return new String(inputBuffer, 0, len);
    }

    public String linepar() throws IOException {
        int len = 0;
        int c;
        while ((c = in.read()) != '\n' && c != -1) {
            if (c == '\r') {
                continue;
            }
            inputBuffer[len] = (char)c;
            len++;
        }
        return new String(inputBuffer, 0, len);
    }

    public boolean haspar() throws IOException {
        String line = linepar();
        if (line.isEmpty()) {
            return false;
        }
        in.unread('\n');
        in.unread(line.toCharArray());
        return true;
    }

    public void shuffle(int[] arr) {
        int n = arr.length;
        for (int i = 0; i < n; i++) {
            int j = (int)(Math.random() * (n-i));
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
    }

    public void shuffle(long[] arr) {
        int n = arr.length;
        for (int i = 0; i < n; i++) {
            int j = (int)(Math.random() * (n-i));
            long temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
    }

    public void shuffle(Object[] arr) {
        int n = arr.length;
        for (int i = 0; i < n; i++) {
            int j = (int)(Math.random() * (n-i));
            Object temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
    }

    public static void main(String[] args) throws IOException {
        if (FILE_INPUT) {
            in = new PushbackReader(new BufferedReader(new FileReader(new File("test.txt"))), 1 << 20);
        }
        if (FILE_OUTPUT) {
            out = new PrintWriter(new FileWriter(new File("output.txt")));
        }
        long time = 0;
        time -= System.nanoTime();
        new G().go();
        time += System.nanoTime();
        if (RUN_TIMING) {
            System.out.printf("%.3f ms%n", time / 1000000.0);
        }
        out.flush();
        in.close();
    }
}
