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
#include <bits/stdc++.h>
using namespace std;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(int64_t &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const int64_t &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.first);
  putchar(' ');
  _W(x.second);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
int MOD = 1e9 + 7;
void ADD(long long &x, long long v) {
  x = (x + v) % MOD;
  if (x < 0) x += MOD;
}
const int SIZE = 1 << 20;
int d[2][SIZE];
vector<pair<int, int> > e[SIZE];
int u[SIZE], tt;
vector<int> gg[2];
void f(int x, int lt, int st) {
  u[x] = tt;
  if (x == st) {
    if (e[x][0].first == e[x][1].first) {
      u[e[x][0].first] = tt;
      for (int j = 0; j < (2); ++j) {
        if (e[x][j].second > 0)
          gg[j].emplace_back(e[x][j].second);
        else
          gg[1 ^ j].emplace_back(-e[x][j].second);
      }
      return;
    }
  }
  for (auto &[y, id] : e[x]) {
    if (y == lt) continue;
    if (id > 0) {
      gg[0].emplace_back(id);
    } else {
      gg[1].emplace_back(-id);
    }
    if (y == st) return;
    f(y, x, st);
    return;
  }
}
void solve() {
  tt++;
  int n;
  R(n);
  for (int i = 0; i < (2); ++i)
    for (int j = (1); j <= (n); ++j) R(d[i][j]);
  for (int i = (1); i <= (n); ++i) e[i].clear();
  for (int i = (1); i <= (n); ++i) {
    e[d[0][i]].emplace_back(make_pair(d[1][i], i));
    e[d[1][i]].emplace_back(make_pair(d[0][i], -i));
  }
  for (int i = (1); i <= (n); ++i) {
    if (((int)(e[i]).size()) != 2) {
      W(-1);
      return;
    }
  }
  vector<int> an;
  for (int i = (1); i <= (n); ++i) {
    if (u[i] != tt) {
      for (int j = 0; j < (2); ++j) gg[j].clear();
      f(i, i, i);
      int tar = 1;
      if (((int)(gg[0]).size()) < ((int)(gg[1]).size())) tar = 0;
      for (int x : gg[tar]) an.emplace_back(x);
    }
  }
  W(((int)(an).size()));
  W(an);
}
int main() {
  int ___T;
  scanf("%d", &___T);
  for (int cs = 1; cs <= ___T; cs++) {
    solve();
  }
  return 0;
}
