#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ll long long
using pss = pair<string, string>;
using pll = pair<ll, ll>;
using pls = pair<ll,string>;
typedef tree<ll, null_type, less_equal<ll>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
#define endl '\n';
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const long long mod = 1 * 1e18 + 7;
int main()
{
    IO;
    ll i=0, j=0, m=0, n=0, k=0, t=0;
    cin>>t;
    while(t--)
    {
        cin>>n;
        string s[3];
        for(i=0;i<3;i++)
        cin>>s[i];
        string ans="";
        ans.push_back('1');
        for(i=0;i<n;i++)
        ans.push_back('0');
        for(i=0;i<n;i++)
        ans.push_back('1');
        cout<<ans<<endl;
    }
    return 0;
}
//ayame保佑，夸哥保佑，狗妈保佑，MDR保佑，锉刀怪保佑，M99保佑，克爹保佑
#include<bits/stdc++.h>
using namespace std;
int P1=1000000,P2=0;
char buf[1000005],wb[1000005];
int gc() {
	if(P1>=1000000)fread(buf,1,1000000,stdin),P1=0;
	return buf[P1++];
}
#define gc getchar
#define Loli true
long long getint() {
	long long ret=0,flag=1;
	char c=gc();
	while(c<'0'||c>'9') {
		if(c=='-')flag=-1;
		c=gc();
	}
	while(c<='9'&&c>='0') {
		ret=(ret<<3)+(ret<<1)+c-'0';
		c=gc();
	}
	return ret*flag;
}
void pc(char x) {
	if(P2>=1000000)fwrite(wb,1,1000000,stdout),P2=0;
	wb[P2++]=x;
}
void wrt(long long x) {
	if(x<0)pc('-'),x=-x;
	int c[24]= {0};
	if(!x)return pc('0'),void();
	while(x)c[++c[0]]=x%10,x/=10;
	while(c[0])pc(c[c[0]--]+'0');
}
char c[200005];
int n,f[3][200005];
int main() {
	int Ti=getint();
	while(Ti--) {
		n=getint();
		scanf("%s",c+1);
		for(int i=1; i<=n; i++)f[0][i]=c[i]=='1';
		scanf("%s",c+1);
		for(int i=1; i<=n; i++)f[1][i]=c[i]=='1';
		scanf("%s",c+1);
		for(int i=1; i<=n; i++)f[2][i]=c[i]=='1';
		for(int i=1; i<=n; i++)pc(49);
		for(int i=1; i<=n; i++)pc(48);
		pc(49),pc(10);
	}
	fwrite(wb,1,P2,stdout);
	return 0;
}
/*
10011001
01100110
10101010
11001100
00110011

11001
*/