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

For each $i$, $a_i \neq b_i$, $a_i \neq c_i$, $b_i \neq c_i$.

Find a sequence $p_1, p_2, \ldots, p_n$, that satisfy the following conditions:



 $p_i \in \{a_i, b_i, c_i\}$

 $p_i \neq 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 \leq t \leq 100$): the number of test cases.

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

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \leq a_i \leq 100$).

The third line contains $n$ integers $b_1, b_2, \ldots, b_n$ ($1 \leq b_i \leq 100$).

The fourth line contains $n$ integers $c_1, c_2, \ldots, c_n$ ($1 \leq c_i \leq 100$).

It is guaranteed that $a_i \neq b_i$, $a_i \neq c_i$, $b_i \neq c_i$ for all $i$.


-----Output-----

For each test case, print $n$ integers: $p_1, p_2, \ldots, p_n$ ($p_i \in \{a_i, b_i, c_i\}$, $p_i \neq 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 \neq p_2 $, $p_2 \neq p_3 $, $p_3 \neq 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.

Difficulty: interview

Starter code:

Solutions:
import sys
import random
from fractions import Fraction
from math import *
 
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())

def finput():
    return float(input())

def tinput():
    return input().split()

def linput():
    return list(input())
 
def rinput():
    return list(map(int, tinput()))

def fiinput():
    return list(map(float, tinput()))
 
def rlinput():
    return list(map(int, input().split()))
def trinput():
    return tuple(rinput())

def srlinput():
    return sorted(list(map(int, input().split())))

def NOYES(fl):
    if fl:
        print("NO")
    else:
        print("YES")
def YESNO(fl):
    if fl:
        print("YES")
    else:
        print("NO")
    
def main():
    n = iinput()
    #k = iinput() 
    #m = iinput() 
    #n = int(sys.stdin.readline().strip()) 
    #n, k = rinput()
    #n, m = rinput()
    #m, k = rinput()
    #n, k, m = rinput()
    #n, m, k = rinput()
    #k, n, m = rinput()
    #k, m, n = rinput() 
    #m, k, n = rinput()
    #m, n, k = rinput()
    q = [rlinput(), rlinput(), rlinput()]
    #q = linput()
    ans = q[0].copy()
    for i in range(1, n):
        if ans[i] == ans[i - 1]:
            ans[i] = q[1][i]
        if i == n - 1:
            o = 0
            while q[o][i] == ans[n - 2] or q[o][i] == ans[0]:
                o += 1
            ans[i] = q[o][i]
    print(*ans)

        

            
        
    
                
    
    
    
            
    
        
    

for i in range(iinput()):
    main()


for _ in range(int(input())):
  n=int(input())
  a=list(map(int,input().split()))
  b=list(map(int,input().split()))
  c=list(map(int,input().split()))
  p=a
  for i in range(n):
    if p[i]==p[(i+1)%n]:
      if p[i]!=b[i] and p[(i-1)%n]!=b[i]:p[i]=b[i]
      else:p[i]=c[i]
  print(*p)

for __ in range(int(input())):
    n = int(input())
    ar1 = list(map(int, input().split()))
    ar2 = list(map(int, input().split()))
    ar3 = list(map(int, input().split()))
    ans = [ar1[0]]
    for i in range(1, n - 1):
        if ar1[i] != ans[-1]:
            ans.append(ar1[i])
        elif ar2[i] != ans[-1]:
            ans.append(ar2[i])
        elif ar3[i] != ans[-1]:
            ans.append(ar3[i])
    if ar1[-1] != ans[-1] and ar1[-1] != ans[0]:
        ans.append(ar1[-1])
    elif ar2[-1] != ans[-1] and ar2[-1] != ans[0]:
        ans.append(ar2[-1])
    elif ar3[-1] != ans[-1] and ar3[-1] != ans[0]:
        ans.append(ar3[-1])
    print(*ans)

T = int(input())

for t in range(T):
    N = int(input())
    A = [int(_) for _ in input().split()]
    B = [int(_) for _ in input().split()]
    C = [int(_) for _ in input().split()]

    R = []

    for i in range(N):
        if i == 0:
            R.append(A[i])
            continue
        if i == N-1:
            if A[i] != R[0] and A[i] != R[-1]:
                R.append(A[i])
            elif B[i] != R[0] and B[i] != R[-1]:
                R.append(B[i])
            else:
                R.append(C[i])
            continue

        if A[i] != R[-1]:
            R.append(A[i])
        else:
            R.append(B[i])

    print(' '.join(map(str, R)))


gans = []
for _ in range(int(input())):
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    c = list(map(int, input().split()))
    ans = [a[0]]
    for i in range(1, n - 1):
        if a[i] != ans[i - 1]:
            ans.append(a[i])
        else:
            ans.append(b[i])
    if a[-1] != ans[-1] and a[-1] != ans[0]:
        ans.append(a[-1])
    elif b[-1] != ans[-1] and b[-1] != ans[0]:
        ans.append(b[-1])
    else:
        ans.append(c[-1])
    gans.append(' '.join(map(str, ans)))
print('\n'.join(gans))


from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
input=sys.stdin.readline
def inp():
    return int(input())
def st():
    return input().rstrip('\n')
def lis():
    return list(map(int,input().split()))
def ma():
    return list(map(int,input().split()))
t=inp()
while(t):
    t-=1
    n=inp()
    a=lis()
    b=lis()
    c=lis()
    r=[a[0]]
    for i in range(1,n):
        if(i==n-1):
            if(a[i]!=r[0] and a[i]!=r[-1]):
                r.append(a[i])
                continue
            if(b[i]!=r[0] and b[i]!=r[-1]):
                r.append(b[i])
                continue
            if(c[i]!=r[0] and c[i]!=r[-1]):
                r.append(c[i])
                continue
        if(a[i]!=r[-1]):
            r.append(a[i])
            continue
        if(b[i]!=r[-1]):
            r.append(b[i])
            continue
        if(c[i]!=r[-1]):
            r.append(c[i])
            continue
    print(*r)