#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define CHECK(x) cout << (#x) << " is " << (x) << endl;

void solve()
{
	int a,b,c;
	int n;
	cin>>n;
	string x,y,z;
	a=b=c=0;
	cin>>x>>y>>z;
	int cnt=0;
	for(auto &cv:x)
	{
		if(cv=='1')
			a++;
	}
	for(auto &cv:y)
	{
		if(cv=='1')
			b++;
	}
	for(auto &cv:z)
	{
		if(cv=='1')
			c++;
	}
	if(a>b)
	{
		swap(a,b);
		swap(x,y);
	}
	if(a>c)
	{
		swap(a,c);
		swap(x,z);
	}
	if(b>c)
	{
		swap(b,c);
		swap(y,z);
	}
	if(b>=n)
	{
		int l=0;
		string ans;
		for(int i=0;i<2*n;i++)
		{
			if(l>=2*n)
			{
				ans.push_back(z[i]);
			}
			else if(z[i]==y[l])
			{
				cnt++;
				ans.push_back(z[i]);
				l++;
			}
			else if(z[i]=='1')
			{
				while(l<2*n&&y[l]=='0')
				{
					ans.push_back(y[l]);
					l++;
				}
				ans.push_back(z[i]);
				l++;
				cnt++;
			}
			else
			{
				ans.push_back(z[i]);
			}
		}
		while(l<2*n)
		{
			ans.push_back(y[l]);
			l++;
		}
		cout<<ans<<'\n';
	}
	else
	{
		int l=0;
		string ans;
		for(int i=0;i<2*n;i++)
		{
			if(l>=2*n)
			{
				ans.push_back(x[i]);
			}
			else if(x[i]==y[l])
			{
				cnt++;
				ans.push_back(x[i]);
				l++;
			}
			else if(x[i]=='0')
			{
				while(l<2*n&&y[l]=='1')
				{
					ans.push_back(y[l]);
					l++;
				}
				ans.push_back(x[i]);
				l++;
				cnt++;
			}
			else
			{
				ans.push_back(x[i]);
			}
		}
		while(l<2*n)
		{
			ans.push_back(y[l]);
			l++;
		}
		cout<<ans<<'\n';
	}
	assert(cnt>=n);

}
int32_t main()
{
	ios::sync_with_stdio(false);cin.tie(0);
	int t=1;
	cin>>t;
	while(t--)
	{
		solve();
	}
    return 0;
}