#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
#define rep(i, n) for(int i=0;i<n;i++)
#define all(i, v) for(auto& i : v)
typedef long long ll;
using namespace std;
const ll mod=1000000007, INF=(1LL<<60);
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin >> t;
    rep(i, t){
    	int n;
    	cin >> n;
    	string a;
    	rep(j, 3) cin >> a;
    	string s(n, '0');
    	string t(n, '1');
    	cout << s + t + "0" << endl;
    }
    return 0;
}



#include<bits/stdc++.h>
#define ll long long
#define fr(i,k,n) for(ll i = k;i<n;i++)
using namespace std;

int main(){
    ll t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        string a,b,c;
        cin>>a;
        cin>>b;
        cin>>c;
        ll cs = a.size();
         cs /= 2;
         fr(i,0,cs){
             cout<<"0";
         }
         fr(i,0,cs){
             cout<<"1";
         }
         cout<<"0"<<"\n";
         
    }
}