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>
#pragma GCC target("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <typename T>
T sqr(T a) {
  return a * a;
}
template <typename T>
int sign(T a) {
  if (a == 0) return 0;
  return (a > 0 ? 1 : -1);
}
template <typename T>
bool uax(T& a, const T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool uin(T& a, const T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2>& p) {
  out << p.first << ' ' << p.second;
  return out;
}
mt19937_64 rnd(0);
const int LOG = 64;
const int N = (int)2e5 + 7;
const int MAXN = (int)1e6 + 7;
const int MOD = (int)1e9 + 7;
const int INF = (int)2e9 + 7;
const int CONST = 450;
const long long LINF = (int64_t)1e18;
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1;
bool used[2 * N];
int n, a[N], b[N];
vector<int> gr[2 * N], ver;
vector<pair<int, int>> in[N];
void dfs(int u) {
  used[u] = true;
  ver.push_back(u);
  for (int v : gr[u]) {
    if (!used[v]) dfs(v);
  }
}
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) in[i].clear();
  for (int i = 0; i < 2 * n; i++) gr[i].clear();
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    in[a[i]].push_back(make_pair(i, 0));
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    in[b[i]].push_back(make_pair(i, 1));
  }
  for (int i = 1; i <= n; i++) {
    if ((int)in[i].size() != 2) {
      cout << "-1\n";
      return;
    }
    int u = in[i][0].first, v = in[i][1].first;
    if (in[i][0].second != in[i][1].second) {
      gr[u].push_back(v);
      gr[v].push_back(u);
      gr[u + n].push_back(v + n);
      gr[v + n].push_back(u + n);
    } else {
      gr[u].push_back(v + n);
      gr[v].push_back(u + n);
      gr[u + n].push_back(v);
      gr[v + n].push_back(u);
    }
  }
  fill(used, used + 2 * n, false);
  vector<int> ans;
  for (int i = 0; i < 2 * n; i++) {
    if (used[i]) continue;
    ver.clear();
    dfs(i);
    int l = 0, r = 0;
    for (int v : ver) {
      if (v < n)
        l++, used[v + n] = true;
      else
        r++, used[v - n] = true;
    }
    if (l < r) {
      for (int& v : ver) {
        if (v < n)
          v += n;
        else
          v -= n;
      }
    }
    for (int v : ver) {
      if (v >= n) ans.push_back(v - n + 1);
    }
  }
  cout << (int)ans.size() << "\n";
  for (int x : ans) cout << x << ' ';
  cout << "\n";
}
int main() {
  double start = clock();
  cout << fixed << setprecision(20);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  rnd.seed(time(0));
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) {
    solve();
  }
}
