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>
using namespace std;
vector<bool> prime;
vector<long long> fact, inv, primes, factors;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void factorize(long long a) {
  factors.clear();
  for (long long i = 1; i * i <= a; i++) {
    if (i * i == a)
      factors.push_back(i);
    else if (a % i == 0) {
      factors.push_back(i);
      factors.push_back(a / i);
    }
  }
  sort(factors.begin(), factors.end());
}
long long power(long long a, long long b) {
  if (a == 1 || b == 0) return 1;
  long long c = power(a, b / 2);
  long long res = 1;
  res = c * c;
  if (res >= 1000000007) res %= 1000000007;
  if (b % 2) res *= a;
  if (res >= 1000000007) res %= 1000000007;
  return res;
}
long long modInv(long long a) { return power(a, 1000000007 - 2); }
void factorial(long long n) {
  fact.resize(n + 1);
  fact[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fact[i] = fact[i - 1] * i;
    if (fact[i] >= 1000000007) fact[i] %= 1000000007;
  }
}
void InvFactorial(long long n) {
  inv.resize(n + 1);
  inv[0] = 1;
  for (long long i = 1; i <= n; i++) inv[i] = modInv(fact[i]);
}
long long ncr(long long n, long long r) {
  if (n < r || n < 0 || r < 0) return 0;
  long long b = inv[n - r];
  long long c = inv[r];
  long long a = fact[n] * b;
  if (a >= 1000000007) a %= 1000000007;
  a *= c;
  if (a >= 1000000007) a %= 1000000007;
  return a;
}
void remove_duplicates(vector<pair<long long, long long> > &v) {
  sort(v.begin(), v.end());
  long long _size = unique(v.begin(), v.end()) - v.begin();
  v.resize(_size);
}
unsigned long long gcd(unsigned long long u, unsigned long long v) {
  if (u == 0 || v == 0) return max(u, v);
  unsigned long long shift = __builtin_ctz(u | v);
  u >>= __builtin_ctz(u);
  do {
    v >>= __builtin_ctz(v);
    if (u > v) swap(u, v);
    v -= u;
  } while (v != 0);
  return u << shift;
}
void sieve(long long n) {
  prime.assign(n + 1, 1);
  prime[1] = false;
  for (long long p = 2; p * p <= n; p++)
    if (prime[p])
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
  for (long long i = 2; i < n + 1; i++)
    if (prime[i]) primes.push_back(i);
}
long long size(long long l) {
  long long p = l;
  long long count = 0;
  while (p) p /= 10, count++;
  return count;
}
void solve() {
  long long n = 3, m;
  cin >> m;
  long long a[n][m];
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++) cin >> a[i][j];
  vector<long long> d(m);
  d[0] = a[0][0];
  cout << d[0] << ' ';
  for (long long i = 1; i < m - 1; i++) {
    if (a[0][i] != d[i - 1])
      d[i] = a[0][i];
    else if (a[1][i] != d[i - 1])
      d[i] = a[1][i];
    else
      d[i] = a[2][i];
    cout << d[i] << ' ';
  }
  if (a[0][m - 1] != d[m - 2] && a[0][m - 1] != d[0])
    d[m - 1] = a[0][m - 1];
  else if (a[1][m - 1] != d[m - 2] && a[1][m - 1] != d[0])
    d[m - 1] = a[1][m - 1];
  else
    d[m - 1] = a[2][m - 1];
  cout << d[m - 1];
  cout << '\n';
}
signed main() {
  fast();
  long long T = 1;
  cin >> T;
  for (long long i = 1; i <= T; i++) solve();
}
