#include<bits/stdc++.h>
using namespace std;

//#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


#define pb push_back
#define fi first
#define se second
#define ll long long
#define ld long double
#define lll __int128
#define tp top()
#define fr front()
#define vi vector<int>
#define sz size()
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define mem(a,  b) memset(a,  (b),  sizeof(a))
#define clr(a) memset(a,  0,  sizeof(a))
#define sqr(x) ( (x) * (x) )
#define all(v) v.begin(),  v.end()

typedef pair<int, int> pii;
typedef pair<int,pii> pip;
typedef pair<pii,int> ppi;
typedef pair<pii,pii> ppp;



void optIO(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}

string s1,s2,s3,ss1,ss2,ss3;
int n;

void solve(){
	cin>>n;
	
	cin>>s1>>s2>>s3;
	string s;
	rep(i,0,n) s+='0';
	rep(i,0,n) s+='1';
	s += '0';
	cout<<s<<"\n";
}

int main()
{
	optIO();
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
	int t=1;
	cin>>t;
	while(t--){
		solve();
	}
	return 0;
}





#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
#include <tuple>
using namespace std;

void yes(){ cout << "yes" << endl; }
void Yes(){ cout << "Yes" << endl; }
void YES(){ cout << "YES" << endl; }
void no(){ cout << "no" << endl; }
void No(){ cout << "No" << endl; }
void NO(){ cout << "NO" << endl; }
void print(string str){ cout << str << endl;}
#define rep(i, n)for(int i=0; i<n; i++)
#define ll long long

ll inf = 1000000007;
ll INF = 1000000000000000007;


int main(){
  ll T;
  cin >> T;

  rep(i, T){
    ll N;
    cin >> N;
    string S[3];
    rep(j, 3){
      cin >> S[j];
    }
    ll end = 2*N-1;
    // 末尾が全て同じ
    if(S[0][end] == S[1][end] && S[1][end] == S[2][end]){
      if(S[0][end] == '0'){
	rep(j, N){
	  cout << "1";
	}
	rep(j, N){
	  cout << "0";
	}
	cout << "1" << endl;
      }
      else{
	rep(j, N){
          cout << "0";
        }
        rep(j, N){
          cout << "1";
        }
        cout <<	"0" << endl;
      }
    }
    // 末尾が全て同じでない
    else{
      rep(j, N){
	cout << "0";
      }
      rep(j, N){
	cout << "1";
      }
      cout << "0" << endl;
    }
    
  }
  
  
  return 0;
}
