Problem: A bitstring is a string that contains only the characters 0 and 1.

Koyomi Kanou is working hard towards her dream of becoming a writer. To practice, she decided to participate in the Binary Novel Writing Contest. The writing prompt for the contest consists of three bitstrings of length 2n. A valid novel for the contest is a bitstring of length at most 3n that contains at least two of the three given strings as subsequences.

Koyomi has just received the three prompt strings from the contest organizers. Help her write a valid novel for the contest.

A string a is a subsequence of a string b if a can be obtained from b by deletion of several (possibly, zero) characters.

Input

The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases.

The first line of each test case contains a single integer n (1 ≤ n ≤ 10^5).

Each of the following three lines contains a bitstring of length 2n. It is guaranteed that these three strings are pairwise distinct.

It is guaranteed that the sum of n across all test cases does not exceed 10^5.

Output

For each test case, print a single line containing a bitstring of length at most 3n that has at least two of the given bitstrings as subsequences.

It can be proven that under the constraints of the problem, such a bitstring always exists.

If there are multiple possible answers, you may output any of them.

Example

Input


2
1
00
11
01
3
011001
111010
010001


Output


010
011001010

Note

In the first test case, the bitstrings 00 and 01 are subsequences of the output string: 010 and 010. Note that 11 is not a subsequence of the output string, but this is not required.

In the second test case all three input strings are subsequences of the output string: 011001010, 011001010 and 011001010.

Solution (in JAVA):

Solution:


import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;




public class Main {

	public static void main(String[] args) throws Exception{
		FastReader s = new FastReader();
		int tc = s.nextInt();
		while(tc-- > 0) {
			int n = s.nextInt();
			char[] first = s.next().toCharArray();
			char[] second = s.next().toCharArray();
			char[] third = s.next().toCharArray();

			int fs = 0 , ss = 0 , ts = 0;
			StringBuilder sb = new StringBuilder();
			while(fs != first.length && ss != second.length && ts != third.length) {
				if(first[fs] == second[ss] && first[fs] == third[ts]) {
					sb.append(first[fs]);
					fs++;
					ss++;
					ts++;
				}
				else if(first[fs] == second[ss]) {
					sb.append(first[fs]);
					fs++;
					ss++;
					
				}
				else if(first[fs] == third[ts]) {
					sb.append(first[fs]);
					fs++;
					ts++;
					
				}
				else {
					sb.append(second[ss]);
					ss++;
					ts++;	
				}
				
			}
			int k = sb.length();
			if(fs != 2*n && 2*n - fs <= 3*n - k) {
				for(int i = fs;i < 2*n;i++) sb.append(first[i]);
			}
			else if(ss != 2*n && 2*n - ss <= 3*n - k) {
				for(int i = ss;i < 2*n;i++) sb.append(second[i]);
			}
			else if(ts != 2*n && 2*n - ts <= 3*n - k) {
				for(int i = ts;i < 2*n;i++) sb.append(third[i]);
			}
			
			System.out.println(sb.toString());
		}
	}

	public static boolean func(boolean[] visited , char[] ch , char[] first , char[] second) {
		int n = visited.length;
		int j = 0;
		for(int i = 0;i < n;i++) {
			if(first[j] == ch[i]) {
				visited[i] = true;
				j++;
				if(j == n/2) break;
			}
		}
		j = 0;
		for(int i = 0;i < n;i++) {
			if(second[j] == ch[i]) {
				visited[i] = true;
				j++;
				if(j == n/2) break;
			}
		}
		int cnt = 0;
		for(int i =0;i < n;i++) {
			if(!visited[i]) cnt++;
		}
		if(cnt >= n/4) return true;
		return false;
	}

	public static long fun(int[] input , int l , int r , long[][] grid) {
		if(grid[l][r] != -1) return grid[l][r];
		if(l == r) return 0; 
		return grid[l][r] = input[r] - input[l] + Math.min(fun(input , l + 1 , r , grid), fun(input , l , r - 1 , grid));
	}

	public static long gcd(long a , long b) {
		return (b == 0) ? a : gcd(b , a%b);
	}

	public static int count(long n) {
		int digits = 0;
		while(n != 0) {
			n /= 10;
			digits++;
		}
		return digits;
	}

	public static int fun(int a , int b) {
		if(a == 0) return 0;
		if(b > a) return 1;

		int val = 1 + fun(a/b , b);
		int val1 = 1 + fun(a , b + 1);

		return Math.min(val , val1);
	}


	public static boolean findDivisor(long n) {
		for(int i = 2;i <= Math.sqrt(n);i++) {
			if(n % i == 0) {
				if(i % 2 == 1) return true;
				else if((n/i) % 2 == 1) return true;
			}
		}
		return false;
	}
	public static void mergeSort(int[] input) {
		mergeSort(input , 0 , input.length - 1);
	}

	public static void mergeSort(int[] input , int si , int ei) {
		if(si >= ei) {
			return;
		}

		int mid = (si + ei) / 2;
		mergeSort(input , si , mid);
		mergeSort(input , mid + 1 , ei);
		merge(input , si , ei);
	}

	public static void merge(int[] input , int si , int ei) {
		int[] temp = new int[ei - si + 1];
		int[] t = new int[ei - si + 1];
		int mid = (si + ei) / 2;
		int i = si;
		int j = mid + 1;
		int k = 0;
		while(i <= mid && j <= ei) {
			if(input[i] < input[j]) {
				temp[k] = input[i];
				i++;
				k++;
			}
			else {
				temp[k] = input[j];
				j++;
				k++;
			}
		}
		while(i <= mid) {
			temp[k] = input[i];
			i++;
			k++;
		}
		while(j <= ei) {
			temp[k] = input[j];
			j++;
			k++;
		}

		for(i = 0;i < temp.length;i++) {
			input[i + si] = temp[i];
		}
	}

}

class pair {
	int h;
	int w;
}
class FastReader 
{ 
	BufferedReader br; 
	StringTokenizer st; 

	public FastReader() 
	{ 
		br = new BufferedReader(new
				InputStreamReader(System.in)); 
	} 

	String next() 
	{ 
		while (st == null || !st.hasMoreElements()) 
		{ 
			try
			{ 
				st = new StringTokenizer(br.readLine()); 
			} 
			catch (IOException  e) 
			{ 
				e.printStackTrace(); 
			} 
		} 
		return st.nextToken(); 
	} 

	int nextInt() 
	{ 
		return Integer.parseInt(next()); 
	} 

	long nextLong() 
	{ 
		return Long.parseLong(next()); 
	} 

	double nextDouble() 
	{ 
		return Double.parseDouble(next()); 
	} 

	String nextLine() 
	{ 
		String str = ""; 
		try
		{ 
			str = br.readLine(); 
		} 
		catch (IOException e) 
		{ 
			e.printStackTrace(); 
		} 
		return str; 
	} 
}