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
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class G
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int T = Integer.parseInt(st.nextToken());
         StringBuilder sb = new StringBuilder();
         matcha:while(T-->0)
         {
            int N = Integer.parseInt(infile.readLine());
            int[] arr = readArr(N, infile, st);
            int[] brr = readArr(N, infile, st);
            if(1 == 2)
               sb.append("-1\n");
            else
            {
               ArrayList<Integer>[] buckets = new ArrayList[N+1];
               for(int i=1; i <= N; i++)
                  buckets[i] = new ArrayList<Integer>();
               for(int i=0; i < N; i++)
               {
                  buckets[arr[i]].add(i);
                  buckets[brr[i]].add(i);
                  if(Math.max(buckets[arr[i]].size(), buckets[brr[i]].size()) >= 3)
                  {
                     sb.append("-1\n");
                     continue matcha;
                  }
               }
               ArrayDeque<Integer>[] edges = new ArrayDeque[N];
               for(int i=0; i < N; i++)
                  edges[i] = new ArrayDeque<Integer>();
               for(int val=1; val <= N; val++)
               {
                  if(buckets[val].size() != 2)
                  {
                     sb.append("-1\n");
                     continue matcha;
                  }
                  int a = buckets[val].get(0);
                  int b = buckets[val].get(1);
                  edges[a].add(b); edges[b].add(a);
               }
               //graph coloring?
               boolean[] seen = new boolean[N];
               int[] color = new int[N];
               Arrays.fill(color, -1);
               for(int v=0; v < N; v++)
                  if(!seen[v])
                  {
                     ArrayDeque<Integer> q = new ArrayDeque<Integer>();
                     q.add(v); q.add(-1); //parent, assume root isnt flipped
                     color[v] = 0; seen[v] = true;
                     ArrayList<Integer> encounters = new ArrayList<Integer>();
                     while(q.size() > 0)
                     {
                        int curr = q.poll();
                        int par = q.poll();
                        for(int next: edges[curr])
                           if(next != par && !seen[next])
                           {
                              color[next] = color[curr];
                              if(conflict(arr, brr, curr, next))
                                 color[next] ^= 1;
                              q.add(next); q.add(curr);
                              seen[next] = true;
                           }
                        encounters.add(curr);
                     }
                     //check
                     int cnt = 0;
                     for(int vv: encounters)
                        cnt += color[vv];
                     if(cnt > encounters.size()-cnt)
                        for(int vv: encounters)
                           color[vv] ^= 1;
                  }
               HashSet<Integer> set1 = new HashSet<Integer>();
               HashSet<Integer> set2 = new HashSet<Integer>();
               for(int i=0; i < N; i++)
               {
                  if(color[i] == 0)
                  {
                     set1.add(arr[i]);
                     set2.add(brr[i]);
                  }
                  else
                  {
                     set1.add(brr[i]);
                     set2.add(arr[i]);
                  }
               }
               if(set1.size() != N || set2.size() != N)
               {
                  sb.append("-1\n");
                  continue matcha;
               }
               int res = 0;
               for(int x: color)
                  res += x;
               sb.append(res+"\n");
               for(int i=0; i < N; i++)
                  if(color[i] == 1)
                     sb.append((i+1)+" ");
               sb.append("\n");
            }
         }
         System.out.print(sb);
      }
      public static boolean conflict(int[] arr, int[] brr, int dex1, int dex2)
      {
         int a = arr[dex1]; int b = brr[dex1];
         int c = arr[dex2]; int d = brr[dex2];
         if(a == c || b == d)
            return true;
         return false;
      }
      public static boolean bad(int[] arr, int[] brr, int N)
      {
         boolean[] seena = new boolean[N+1];
         boolean[] seenb = new boolean[N+1];
         for(int i=0; i < N; i++)
         {
            if(!seena[arr[i]] && !seenb[brr[i]])
               seena[arr[i]] = seenb[brr[i]] = true;
            else
            {
               if(!seena[brr[i]] && !seenb[arr[i]])
                  seena[brr[i]] = seenb[arr[i]] = true;
               else
                  return true;
            }
         }
         return false;
      }
      public static int[] readArr(int N, BufferedReader infile, StringTokenizer st) throws Exception
      {
         int[] arr = new int[N];
         st = new StringTokenizer(infile.readLine());
         for(int i=0; i < N; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         return arr;
      }
   }
   