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.
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
import java.util.InputMismatchException;
public class A
{
    public static void solve()
    {
        int t=sc.nextInt();
        while (t-->0)
        {
           int n=sc.nextInt();
           int[] a=sc.nextIntArray(n);
           int[] b=sc.nextIntArray(n);
           int[] c=sc.nextIntArray(n);
           int[] p=new int[n];
           p[0]=a[0];
           for (int i=1;i<n-1;i++)
           {
        	   if (a[i]==p[i-1])
        	   {
        		  if (b[i]==p[i-1])
        		  {
        			  p[i]=c[i];
        		  }
        		  else
        		  {
        			  p[i]=b[i];
        		  }
        	   }
        	   else
        	   {
        		   p[i]=a[i];
        	   }
           }
           if (a[n-1]!=p[0] && a[n-1]!=p[n-2]) p[n-1]=a[n-1];
           else if (b[n-1]!=p[0] && b[n-1]!=p[n-2]) p[n-1]=b[n-1];
           else p[n-1]=c[n-1];
           for (int each:p) out.print(each+" ");
           out.println();
        }
    }
    public static void main(String[] args) 
    {
        new Thread(null, null, "Thread", 1 << 27) 
        {
            public void run() 
            {
                try 
                {
                    out = new PrintWriter(new BufferedOutputStream(System.out));
                    sc = new FastReader(System.in);
                    solve();
                    out.close();
                } 
                catch (Exception e) 
                {
                    e.printStackTrace();
                    System.exit(1);
                }
            }
        }
                .start();
    }
    static final Random random=new Random();
    static int gcd(int a,int b)
    {
        if (b==a)
            return a;
        return gcd(b,a%b);
    }
    static void UjjwalSort(int[] a) 
    {
        int n=a.length;//shuffle, then sort 
        for (int i=0; i<n; i++) 
        {
            int ujjwal=random.nextInt(n), temp=a[ujjwal];
            a[ujjwal]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }
    public static PrintWriter out;
    public static FastReader sc;
    public static class FastReader 
    {
        private InputStream stream;
        private byte[] buf = new byte[4096];
        private int curChar, snumChars;
        public FastReader(InputStream stream) 
        {
            this.stream = stream;
        }
        public int read() 
        {
            if (snumChars == -1) 
            {
                throw new InputMismatchException();
            }
            if (curChar >= snumChars) 
            {
                curChar = 0;
                try 
                {
                    snumChars = stream.read(buf);
                } 
                catch (IOException E) 
                {
                    throw new InputMismatchException();
                }
            }
            if (snumChars <= 0) 
            {
                return -1;
            }
            return buf[curChar++];
        }
        public int nextInt() 
        {
            int c = read();
            while (isSpaceChar(c)) 
            {
                c = read();
            }
            int sgn = 1;
            if (c == '-') 
            {
                sgn = -1;
                c = read();
            }
            int number = 0;
            do 
            {
                number *= 10;
                number += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return number * sgn;
        }
        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) 
            {
                c = read();
            }
            long sgn = 1;
            if (c == '-') 
            {
                sgn = -1;
                c = read();
            }
            long number = 0;
            do 
            {
                number *= 10L;
                number += (long) (c - '0');
                c = read();
            } while (!isSpaceChar(c));
            return number * sgn;
        }
        public int[] nextIntArray(int n) 
        {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) 
            {
                arr[i] = this.nextInt();
            }
            return arr;
        }
        public long[] nextLongArray(int n) 
        {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) 
            {
                arr[i] = this.nextLong();
            }
            return arr;
        }
        public String next()
        {
            int c = read();
            while (isSpaceChar(c)) 
            {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do 
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() 
        {
            int c = read();
            while (isSpaceChar(c)) 
            {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();	
            } while (!isEndofLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c)
        {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
        public boolean isEndofLine(int c) 
        {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
}
