#include <bits/stdc++.h>
#define startt ios_base::sync_with_stdio(false);cin.tie(0);
typedef unsigned long long ull;
typedef long long  ll;
using namespace std;
#define vint vector<int>
#define all(v) v.begin(), v.end()
#define sz(a) (int)a.size()
#define MOD 1000000007
#define MOD2 998244353
#define MX 1000000000
#define nax 100005
#define MXL 1000000000000000000
#define PI 3.14159265
#define pb push_back
#define pf push_front
#define sc second
#define fr first
#define endl '\n' //delete if interactive
#define ld long double
#define mp make_pair

void solve(){
	int n;cin>>n;
	string a,b,c;cin>>a>>b>>c;
	int lim=2*n+1;
	int x = lim/3;
	for(int i=0;i<n;i++) cout<<"1";
	for(int i=0;i<n;i++) cout<<"0";
	cout<<"1\n";
}

int main(){
	int t=1;cin>>t;
	for(int tc=1;tc<=t;tc++){
		solve();
	}
	return 0;
}

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

int tc, n;
string s[3];

int main(){
	cin.tie(0)->sync_with_stdio(0);
	cin >> tc;
	while(tc--){
		cin >> n;
		for(int i=0;i<3;i++) cin >> s[i];

		for(int i=0;i<n;i++) cout << 1;
		for(int i=0;i<n;i++) cout << 0;
		cout << "1\n";
	}
}