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;
typedef long long ll;
//int n;
//int mat[10001];
//int cnt;
//int main()
//{
//    int t;
//    cin>>t;
//    while(t--)
//    {
//        cin>>n;
//        cnt=1;
//        if(n==2)
//        {
//            cout<<-1<<endl;
//            continue;
//        }
//        for(int i=1; i<=n*n; i+=2)mat[i]=cnt++;
//        for(int i=2; i<=n*n; i+=2)mat[i]=cnt++;
//        cnt=1;
//        for(int i=1; i<=n; i++)
//        {
//            for(int j=1; j<=n; j++)
//            {
//                cout<<mat[cnt++]<<" ";
//            }
//            cout<<endl;
//        }
//    }
//}
//map<int,int>mp;
//int n;
//int main()
//{
//    int t;
//    cin>>t;
//    while(t--)
//    {
//        cin>>n;
//        ll ans=0;mp.clear();
//        for(int i=1;i<=n;i++)
//        {
//            int in;
//
//            cin>>in;
//            in=in-i;
//            if(mp.find(in)!=mp.end())
//            {
//                ans+=mp[in];
//                mp[in]++;
//            }
//            else
//            {
//                mp[in]=1;
//            }
//        }
//        cout<<ans<<endl;
//    }
//}
//ll a,b;
//ll x,y,z;
//int main()
//{
//    int t;
//    cin>>t;
//    while(t--)
//    {
//        cin>>a>>b;
//        if(b==1)
//        {
//            cout<<"NO\n";
//            continue;
//        }
//        else if(b==2)
//        {
//            x=a;
//            y=a*3;
//            z=y-a;
//            cout<<"YES"<<endl;
//            cout<<x<<" "<<z<<" "<<y<<endl;
//            continue;
//        }
//        x=a;
//        y=a*(b-1);
//        z=y+x;
//        cout<<"YES\n";
//        cout<<x<<" "<<y<<" "<<z<<'\n';
//
//    }
//}
//ll gcd(ll x,ll y)
//{
//    int temp;
//    if(x<y)swap(x,y);
//    while(y)
//    {
//        temp=x%y;
//        x=y;
//        y=temp;
//    }
//    return x;
//}
//const int MAX=2*1e5;
//int vis[MAX];
//int cnt;
//ll n;
//ll cg;
//ll t,k,px[MAX],py[MAX],minn,pi,pj,p1[MAX],p2[MAX];
//struct node
//{
//    ll val;
//    ll p;
//}a[MAX];
//bool cmp(node x,node y)
//{
//    return x.val<y.val;
//}
//ll zs[77]={1885057297,1912326109,1896108899,1891103827,1862235959,1911641611,1868064041,1904821411,1900272409,1914554657,1874116311,1936410083,1926887239,1885290413,1891518829,1887813077,1879416461,1903708661,};
//int main()
//{
//
//    cin>>t;
//    while(t--)
//    {
//        k=0;
//        cg=1;
//        cin>>n;
//        a[n+1].val=13;
//        a[0].val=13;
//       // memset(vis,0,sizeof vis);
//        cnt=0;
//        for(int i=1; i<=n; i++)
//        {
//            scanf("%d",&a[i].val);
//            a[i].p=i;
//            if(i!=1&&gcd(a[i].val,a[i-1].val)!=1)
//            {
//                ++cnt;
//               // b[++cnt]=i;
//                vis[i]=1;
//            }
//        }
//      // cout<<cnt<<"cnt"<<endl;
//        if(!cnt)
//        {
//            cout<<"0\n";
//            continue;
//        }
//        sort(a+1,a+n+1,cmp);
//        ll rist[MAX];
//        rist[a[1].p]=a[1].val;
//        for(int i=n;i>1;i--)
//        {
//            k++;
//            p1[k]=a[1].p;
//            p2[k]=a[i].p;
//            px[k]=a[1].val;
//             cg%=17;
//            while(zs[cg]==rist[a[i].p-1]||zs[cg]==rist[a[i].p+1])
//            {
//                cg++;
//                cg%=17;
//            }
//            if(fabs(a[i].p-a[1].p)==1)
//            {
//                while(gcd(zs[cg],a[1].val)!=1)
//                {
//                    cg++;
//                    cg%=17;
//                }
//            }
//
//            py[k]=zs[cg];
//          //  cout<<py[k]<<"k"<<cg<<endl;
//            rist[a[i].p]=zs[cg];
//            //cg=rand()%13+1;
//
//        }
////        for(int i=1;i<=n;i++)
////        {
////            if(rist[i]==1925202353)
////            {
////                k++;
////                p1[k]=a[i].p;
////                p2[k]=a[1].p;
////                px[k]=a[i].val;
////                while(zs[cg]==rist[a[1].p-1]||zs[cg]==rist[a[i].p+1])
////                {
////                    cg++;
////                    cg%=3;
////                }
////                py[k]=zs[cg];
////                break;
////
////            }
////        }
//        cout<<n-1<<'\n';
//        for(int i=1;i<=k;i++)
//        {
//           printf("%lld %lld %lld %lld\n",p1[i],p2[i],px[i],py[i]);
//
//        }
////        for(int i=1;i<=n;i++)
////        {
////            cout<<rist[i]<<" ";
////        }
//    }
//
//    return 0;
//}
//const int M=1e6+7;
//struct node
//{
//    int l,r;
//    ll len;
//};
//node pos[M];
//ll sum[M];
//ll sumf[M];
//ll sumb[M];
//int cnt;
//int n,t;
//int main()
//{
//    cin>>t;
//    while(t--)
//    {
//        cin>>n;
//        char ch;
//        getchar();
//        cnt=0;
//      //  cnt2=0;
//        char pre='@';
//        for(int i=1;i<=n;i++)
//        {
//            ch=getchar();
//            if(ch=='*')
//            {
//                if(pre=='*')
//                {
//                    pos[cnt].r++;
//                    pos[cnt].len++;
//                }
//                else
//                {
//                    pos[++cnt].len=1;
//                    pos[cnt].l=i;
//                    pos[cnt].r=i;
//                }
//                if(i==n)
//                {
//                    sum[cnt]=sum[cnt-1]+pos[cnt].len;
//                    sumf[cnt]=sumf[cnt-1]+(pos[cnt].l-pos[cnt-1].r-1)*sum[cnt-1];
//                }
//            }
//            else if(cnt)
//            {
//                sum[cnt]=sum[cnt-1]+pos[cnt].len;
//                sumf[cnt]=sumf[cnt-1]+(pos[cnt].l-pos[cnt-1].r-1)*sum[cnt-1];
//                //cout<<sumf[cnt]<<endl;
//            }
//            pre=ch;
//        }
//        sumb[cnt+1]=0;
//        sum[cnt+1]=0;
//        ll minn=0x7fffffffff;
//        for(int i=cnt;i;i--)
//        {
//            if(i==cnt)
//            {
//                sumb[i]=0;
//            }
//            else
//            {
//                sumb[i]=sumb[i+1]+(pos[i+1].l-pos[i].r-1)*(sum[cnt]-sum[i]);
//            }
//
//            if(sumb[i]+sumf[i]<minn)
//            {
//                minn=sumb[i]+sumf[i];
//            }
//        }
//
//       // cout<<pos[2].l<<endl;
//        if(cnt)
//        {
//            cout<<minn<<endl;
//        }
//        else
//        {
//            cout<<0<<endl;
//        }
//    }
//}
const int M=2*1e6;
char s1[M],s2[M],s3[M];
char ans[M];
int p1,p2,p3,pans;
int n,t;

int main()
{
    cin>>t;
    while(t--)
    {
        cin>>n;
        scanf("%s%s%s",s1+1,s2+1,s3+1);
        p1=p2=p3=pans=1;
        for(pans;pans<=3*n;pans++)
        {
            if(s1[p1]==s2[p2])
            {
                p1++;
                p2++;
                ans[pans]=s1[p1-1];
            }
            else if(s1[p1]==s3[p3])
            {
                p1++;
                p3++;
                ans[pans]=s3[p3-1];
            }
            else if(s2[p2]==s3[p3])
            {
                ans[pans]=s3[p3];
                p2++;p3++;
            }
            if(p1>2*n||p2>2*n||p3>2*n)
            {
                pans++;
                break;
            }
        }
      //  cout<<p1<<" "<<p2<<" "<<p3<<" "<<pans<<endl;
        if(p1>2*n)
        {
            if(p2>p3)
            {
                for(pans;pans<=3*n&&p2<=2*n;pans++,p2++)
                {
                    ans[pans]=s2[p2];
                }
            }
            else
            {
                for(pans;pans<=3*n&&p3<=2*n;pans++,p3++)
                {
                    ans[pans]=s3[p3];
                }
            }
        }
        else if(p2>2*n)
        {
            if(p1>p3)
            {
                for(pans;pans<=3*n&&p1<=2*n;pans++,p1++)
                {
                    ans[pans]=s1[p1];
                }
            }
            else
            {
                for(pans;pans<=3*n&&p3<=2*n;pans++,p3++)
                {
                    ans[pans]=s3[p3];
                }
            }
        }
        else if(p3>2*n)
        {
            if(p1>p2)
            {
                for(pans; pans<=3*n&&p1<=2*n; pans++,p1++)
                {
                    ans[pans]=s1[p1];
                }
            }
            else
            {
                for(pans; pans<=3*n&&p2<=2*n; pans++,p2++)
                {
                    //cout<<pans<<"P"<<endl;
                    ans[pans]=s2[p2];
                }
            }
        }
        for(int i=1;i<pans;i++)printf("%c",ans[i]);
        printf("\n");
    }
}