You are given three sequences: a_1, a_2, …, a_n; b_1, b_2, …, b_n; c_1, c_2, …, c_n.

For each i, a_i ≠ b_i, a_i ≠ c_i, b_i ≠ c_i.

Find a sequence p_1, p_2, …, p_n, that satisfy the following conditions:

  * p_i ∈ \\{a_i, b_i, c_i\}
  * p_i ≠ p_{(i mod n) + 1}.



In other words, for each element, you need to choose one of the three possible values, such that no two adjacent elements (where we consider elements i,i+1 adjacent for i<n and also elements 1 and n) will have equal value.

It can be proved that in the given constraints solution always exists. You don't need to minimize/maximize anything, you need to find any proper sequence.

Input

The first line of input contains one integer t (1 ≤ t ≤ 100): the number of test cases.

The first line of each test case contains one integer n (3 ≤ n ≤ 100): the number of elements in the given sequences.

The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 100).

The third line contains n integers b_1, b_2, …, b_n (1 ≤ b_i ≤ 100).

The fourth line contains n integers c_1, c_2, …, c_n (1 ≤ c_i ≤ 100).

It is guaranteed that a_i ≠ b_i, a_i ≠ c_i, b_i ≠ c_i for all i.

Output

For each test case, print n integers: p_1, p_2, …, p_n (p_i ∈ \\{a_i, b_i, c_i\}, p_i ≠ p_{i mod n + 1}).

If there are several solutions, you can print any.

Example

Input


5
3
1 1 1
2 2 2
3 3 3
4
1 2 1 2
2 1 2 1
3 4 3 4
7
1 3 3 1 1 1 1
2 4 4 3 2 2 4
4 2 2 2 4 4 2
3
1 2 1
2 3 3
3 1 2
10
1 1 1 2 2 2 3 3 3 1
2 2 2 3 3 3 1 1 1 2
3 3 3 1 1 1 2 2 2 3


Output


1 2 3
1 2 1 2
1 3 4 3 2 4 2
1 3 2
1 2 3 1 2 3 1 2 3 2

Note

In the first test case p = [1, 2, 3].

It is a correct answer, because:

  * p_1 = 1 = a_1, p_2 = 2 = b_2, p_3 = 3 = c_3 
  * p_1 ≠ p_2 , p_2 ≠ p_3 , p_3 ≠ p_1 



All possible correct answers to this test case are: [1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1].

In the second test case p = [1, 2, 1, 2].

In this sequence p_1 = a_1, p_2 = a_2, p_3 = a_3, p_4 = a_4. Also we can see, that no two adjacent elements of the sequence are equal.

In the third test case p = [1, 3, 4, 3, 2, 4, 2].

In this sequence p_1 = a_1, p_2 = a_2, p_3 = b_3, p_4 = b_4, p_5 = b_5, p_6 = c_6, p_7 = c_7. Also we can see, that no two adjacent elements of the sequence are equal.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int mod = 1000000007;
using namespace std;
long long int binpow(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = (res * a);
    }
    a = (a * a);
    b >>= 1;
  }
  return res;
}
long long int binpowmod(long long int a, long long int b, long long int m) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = ((res % m) * (a % m)) % m;
    }
    a = ((a % m) * (a % m)) % m;
    b >>= 1;
  }
  return res;
}
void dex(int a) {
  if (a == 1)
    cout << "1\n";
  else if (a == -1)
    cout << "-1\n";
  else if (a == 0)
    cout << "0\n";
  else if (a == 2)
    cout << "YES\n";
  else if (a == 3)
    cout << "NO\n";
  else if (a == 4)
    cout << "yes\n";
  else if (a == 5)
    cout << "no\n";
}
long long int fermat_inv(long long int y) { return binpow(y, mod - 2); }
long long int fact[100005];
long long int finv[100005];
void factorial(int n) {
  fact[0] = 1;
  finv[0] = 1;
  for (int i = 1; i <= n; i++)
    fact[i] = fact[i - 1] * i, fact[i] %= mod, finv[i] = fermat_inv(fact[i]);
}
long long int ncr(long long int n, long long int r) {
  if (n < r)
    return 0;
  else {
    long long int x = finv[r] * finv[n - r] % mod;
    return fact[n] * x % mod;
  }
}
bool prime[10000001];
vector<long long int> v;
void seive() {
  memset(prime, 1, sizeof(prime));
  for (long long int i = 2; i * i <= 10000001; i++) {
    if (prime[i] == 1) {
      for (long long int j = i * i; j <= 10000001; j += i) {
        prime[j] = 0;
      }
    }
  }
  for (long long int i = 2; i <= 12; i++) {
    if (prime[i]) {
      v.push_back(i);
    }
  }
}
const int p_o = 53;
vector<long long int> p_pow;
void ffpow(long long int n) {
  p_pow.resize(n);
  p_pow[0] = 1;
  for (long long int i = 1; i < n; i++) {
    p_pow[i] = (p_pow[i - 1] * p_o) % MOD;
  }
}
long long int Hash(string const& s) {
  long long int res = 0;
  long long int j = 0;
  for (auto i : s) {
    res += (((i - 'a' + 1) % MOD) * (p_pow[j] % MOD)) % MOD;
    j++;
  }
  return res;
}
vector<long long int> adj[100010];
vector<long long int> vis(100010, 0);
vector<long long int> R(100010, 0);
vector<long long int> par(100010);
vector<long long int> col(100010);
vector<long long int> dis(100010, 0);
vector<long long int> indegree(100010, 0);
long long int r = 0;
void dfs(long long int node) {
  vis[node] = 1;
  for (auto i : adj[node]) {
    if (!vis[i]) {
      par[i] = node;
      dfs(i);
    }
  }
}
void bfs(long long int node) {
  vis[node] = 1;
  queue<long long int> q;
  q.push(node);
  dis[node] = 0;
  while (!q.empty()) {
    long long int src = q.front();
    q.pop();
    for (auto i : adj[src]) {
      if (!vis[i]) {
        dis[i] = dis[src] + 1;
        q.push(i);
        vis[i] = 1;
      }
    }
  }
}
int Find(int x) {
  if (par[x] < 0) return x;
  return par[x] = Find(par[x]);
}
void Union(int x, int y) {
  if (R[x] > R[y]) {
    par[x] += par[y];
    R[x] += R[y];
    par[y] = x;
  } else {
    par[y] += par[x];
    R[y] += R[x];
    par[x] = y;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n], b[n], c[n];
    vector<long long int> v;
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (long long int i = 0; i < n; i++) {
      cin >> b[i];
    }
    for (long long int i = 0; i < n; i++) {
      cin >> c[i];
    }
    v.push_back(a[0]);
    v.push_back(b[0]);
    v.push_back(c[0]);
    sort(v.begin(), v.end());
    cout << v[0] << " ";
    bool flag = true;
    for (long long int i = 1; i < n - 1; i++) {
      if (flag) {
        cout << v[1] << " ";
        flag = false;
      } else {
        cout << v[0] << " ";
        flag = true;
      }
    }
    cout << v[2] << "\n";
  }
  return 0;
}
