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 CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;
int t, n, i, j, k, a, b, x, y, X[5], Y[5];
char A[200010], B[200010], C[200010];
int main()
{
    for(scanf("%d", &t);t--;)
    {
        scanf("%d %s %s %s", &n, &A, &B, &C);x=y=0;
        for(a=b=i=0;i<2*n;i++)
        {
            if(A[i]=='0')a++;
            else b++;
        }
        if(a>=b)x++,X[1]=0,Y[1]=a;
        else y++,X[1]=1,Y[1]=b;
        for(a=b=i=0;i<2*n;i++)
        {
            if(B[i]=='0')a++;
            else b++;
        }
        if(a>=b)x++,X[2]=0,Y[2]=a;
        else y++,X[2]=1,Y[2]=b;
        for(a=b=i=0;i<2*n;i++)
        {
            if(C[i]=='0')a++;
            else b++;
        }
        if(a>=b)x++,X[3]=0,Y[3]=a;
        else y++,X[3]=1,Y[3]=b;
        vector<char>ans;
        if(x>=y)
        {
            vector<int>v1, v2;
            v1.push_back(-1);v2.push_back(-1);
            if(X[1]==0&&X[2]==0)
            {
                y=min(Y[1], Y[2]);
                for(i=0;i<2*n;i++)
                {
                    if(A[i]=='0')
                    {
                        v1.push_back(i);
                    }
                }
                for(i=0;i<2*n;i++)
                {
                    if(B[i]=='0')
                    {
                        v2.push_back(i);
                    }
                }
                for(i=1;i<=y;i++)
                {
                    for(j=v1[i-1]+1;j<=v1[i]-1;j++)ans.push_back(A[j]);
                    for(j=v2[i-1]+1;j<=v2[i]-1;j++)ans.push_back(B[j]);
                    ans.push_back('0');
                }
                for(j=v1[y]+1;j<2*n;j++)ans.push_back(A[j]);
                for(j=v2[y]+1;j<2*n;j++)ans.push_back(B[j]);
                while(ans.size()<3*n)ans.push_back('0');
            }
            else if(X[1]==0&&X[3]==0)
            {
                y=min(Y[1], Y[3]);
                for(i=0;i<2*n;i++)
                {
                    if(A[i]=='0')
                    {
                        v1.push_back(i);
                    }
                }
                for(i=0;i<2*n;i++)
                {
                    if(C[i]=='0')
                    {
                        v2.push_back(i);
                    }
                }
                for(i=1;i<=y;i++)
                {
                    for(j=v1[i-1]+1;j<=v1[i]-1;j++)ans.push_back(A[j]);
                    for(j=v2[i-1]+1;j<=v2[i]-1;j++)ans.push_back(C[j]);
                    ans.push_back('0');
                }
                for(j=v1[y]+1;j<2*n;j++)ans.push_back(A[j]);
                for(j=v2[y]+1;j<2*n;j++)ans.push_back(C[j]);
                while(ans.size()<3*n)ans.push_back('0');
            }
            else
            {
                y=min(Y[2], Y[3]);
                for(i=0;i<2*n;i++)
                {
                    if(B[i]=='0')
                    {
                        v1.push_back(i);
                    }
                }
                for(i=0;i<2*n;i++)
                {
                    if(C[i]=='0')
                    {
                        v2.push_back(i);
                    }
                }
                for(i=1;i<=y;i++)
                {
                    for(j=v1[i-1]+1;j<=v1[i]-1;j++)ans.push_back(B[j]);
                    for(j=v2[i-1]+1;j<=v2[i]-1;j++)ans.push_back(C[j]);
                    ans.push_back('0');
                }
                for(j=v1[y]+1;j<2*n;j++)ans.push_back(B[j]);
                for(j=v2[y]+1;j<2*n;j++)ans.push_back(C[j]);
                while(ans.size()<3*n)ans.push_back('0');
            }
        }
        else
        {
            vector<int>v1, v2;
            v1.push_back(-1);v2.push_back(-1);
            if(X[1]==1&&X[2]==1)
            {
                y=min(Y[1], Y[2]);
                for(i=0;i<2*n;i++)
                {
                    if(A[i]=='1')
                    {
                        v1.push_back(i);
                    }
                }
                for(i=0;i<2*n;i++)
                {
                    if(B[i]=='1')
                    {
                        v2.push_back(i);
                    }
                }
                for(i=1;i<=y;i++)
                {
                    for(j=v1[i-1]+1;j<=v1[i]-1;j++)ans.push_back(A[j]);
                    for(j=v2[i-1]+1;j<=v2[i]-1;j++)ans.push_back(B[j]);
                    ans.push_back('1');
                }
                for(j=v1[y]+1;j<2*n;j++)ans.push_back(A[j]);
                for(j=v2[y]+1;j<2*n;j++)ans.push_back(B[j]);
                while(ans.size()<3*n)ans.push_back('0');
            }
            else if(X[1]==1&&X[3]==1)
            {
                y=min(Y[1], Y[3]);
                for(i=0;i<2*n;i++)
                {
                    if(A[i]=='1')
                    {
                        v1.push_back(i);
                    }
                }
                for(i=0;i<2*n;i++)
                {
                    if(C[i]=='1')
                    {
                        v2.push_back(i);
                    }
                }
                for(i=1;i<=y;i++)
                {
                    for(j=v1[i-1]+1;j<=v1[i]-1;j++)ans.push_back(A[j]);
                    for(j=v2[i-1]+1;j<=v2[i]-1;j++)ans.push_back(C[j]);
                    ans.push_back('1');
                }
                for(j=v1[y]+1;j<2*n;j++)ans.push_back(A[j]);
                for(j=v2[y]+1;j<2*n;j++)ans.push_back(C[j]);
                while(ans.size()<3*n)ans.push_back('0');
            }
            else
            {
                y=min(Y[2], Y[3]);
                for(i=0;i<2*n;i++)
                {
                    if(B[i]=='1')
                    {
                        v1.push_back(i);
                    }
                }
                for(i=0;i<2*n;i++)
                {
                    if(C[i]=='1')
                    {
                        v2.push_back(i);
                    }
                }
                for(i=1;i<=y;i++)
                {
                    for(j=v1[i-1]+1;j<=v1[i]-1;j++)ans.push_back(B[j]);
                    for(j=v2[i-1]+1;j<=v2[i]-1;j++)ans.push_back(C[j]);
                    ans.push_back('1');
                }
                for(j=v1[y]+1;j<2*n;j++)ans.push_back(B[j]);
                for(j=v2[y]+1;j<2*n;j++)ans.push_back(C[j]);
                while(ans.size()<3*n)ans.push_back('0');
            }
        }
        for(i=0;i<ans.size();i++)printf("%c", ans[i]);puts("");
    }
}