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.
# _______________________________________________________________#
from math import *
import threading
import sys


def fact(x):
    if x == 0:
        return 1
    else:
        return x * fact(x - 1)


def lower_bound(li, num):
    answer = -1
    start = 0
    end = len(li) - 1

    while (start <= end):
        middle = (end + start) // 2
        if li[middle] >= num:
            answer = middle
            end = middle - 1
        else:
            start = middle + 1
    return answer  # index where x is not less than num


def upper_bound(li, num):
    answer = -1
    start = 0
    end = len(li) - 1

    while (start <= end):
        middle = (end + start) // 2

        if li[middle] <= num:
            answer = middle
            start = middle + 1

        else:
            end = middle - 1
    return answer  # index where x is not greater than num


def abs(x):
    return x if x >= 0 else -x


def binary_search(li, val, lb, ub):
	ans = -1
	while (lb <= ub):
		mid = (lb + ub) // 2
		# print(mid, li[mid])
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:	
			lb = mid + 1
		else:
			ans = mid # return index
			break
	return ans


def kadane(x):  # maximum sum contiguous subarray
    sum_so_far = 0
    current_sum = 0
    for i in x:
        current_sum += i
        if current_sum < 0:
            current_sum = 0
        else:
            sum_so_far = max(sum_so_far, current_sum)
    return sum_so_far


def pref(li):
    pref_sum = [0]
    for i in li:
        pref_sum.append(pref_sum[-1] + i)
    return pref_sum


def graph(n, m):
    adj = dict()
    for i in range(1, n + 1):
        adj.setdefault(i, 0)
    for i in range(m):
        a, b = map(int, input().split())
        adj[a] += 1
        adj[b] += 1
    return adj


def SieveOfEratosthenes(n):
    prime = [True for i in range(n+1)]
    p = 2
    li = []
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1

    for p in range(2, len(prime)):
        if prime[p]:
            li.append(p)
    return li


# _______________________________________________________________#


INF = 1e9
# sys.setrecursionlimit(900000)
# threading.stack_size(10**5)  # remember it cause mle
# def main():
primes = SieveOfEratosthenes(1300000)
def fn(n):
	i = 2
	res = n-1
	val = 0
	for i in range(int(sqrt(n))+1,1,-1):
	
		val = i - 1 + int(ceil((n-i)/i))
		#print(val,res)
		if val <= res:
			#print(i)
			res = val
		else:
			break
		
	return res
for _ in range(int(input())):
#for _ in range(1):
	n = int(input())
	#n,m = map(int, input().split())
	# s = list(input())
	# a = [int(x) for x in s]
	# s = list(input())
	a = list(map(int, input().split()))
	b = list(map(int,input().split()))
	c = list(map(int,input().split()))
	# adj = graph(n,m)
	ans = [a[0]]
	for i in range(1,n):
		if i != n-1:
			if a[i] == ans[-1]:
				if b[i] == ans[-1]:
					temp = c
				else:
					temp = b
			else:
				temp = a
		else:
			if a[i] == ans[0] or a[i]==ans[-1]:
				if b[i] == ans[0] or b[i] == ans[-1]:
					temp = c
				else:
					temp = b
			else:
				temp = a
		ans.append(temp[i])
	print(*ans)






















'''		
t = threading.Thread(target=main)
t.start()
t.join()
'''
