#pragma GCC optimize ("O2")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
#include<iostream>
#include<cstring>
//#include<atcoder/all>
//using namespace atcoder;

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

char cn[1200010];
char* ci = cn, * di = cn, ct;
//char tc[200002], *d1 = tc + 100000, *d2 = tc + 200000;
const char d[2] = "0";

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	fread(cn, 1, 1200010, stdin);
	int T = 0;
	while ((ct = *ci++) >= '0') T = T * 10 + ct - '0';

	rep(t, T) {
		int N = 0;
		while ((ct = *ci++) >= '0') N = N * 10 + ct - '0';

		memset(di, '0', N);
		di += N;
		memset(di, '1', N);
		di += N;
		*di++ = '0';
		*di++ = '\n';
		ci += 6 * N + 3;
	}
	fwrite(cn, 1, di - cn, stdout);

	Would you please return 0;
}
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
 
#define ll long long
#define ll128 __uint128_t
#define ld long double
#define pll pair <ll, ll>
 
#define vll vector <ll>
#define vld vector<ld>
#define vpll vector<pll>
 
#define vvll vector <vll>
 
#define rep(i, a, b) for(ll i = (ll)a; i < (ll)b; i++)
#define per(i, a, b) for(ll i = (ll)a - 1; i >= (ll)b; --i)
 
#define pb push_back
#define pf push_front
 
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
 
#define sorta(v) sort(all(v))
#define sortd(v) sort(rall(v))
 
#define debug if (1)
#define log(val) debug {cout << "\n" << #val << ": " << val << "\n";}
 
#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define file(name) freopen(name".in", "r", stdin); freopen(name".out", "w", stdout);
#define FILE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
 
#define mod (ll)(1e9 + 7)
 
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;
 
template<typename T>
ostream & operator << (ostream & out, vector<T> & a) {
    for(auto i : a) out << i << " ";
    return out;
}
 
template<typename T>
istream & operator >> (istream & in, vector<T> & a) {
    for(auto &i : a) in >> i;
    return in;
}

int main() {
    ios;
    // freopen("input.txt", "r", stdin);

    ll t;
    cin >> t;
    while(t--) {
        ll n;
        cin >> n;

        rep(i, 0, 3) {
            char q;
            rep(j, 0, 2 * n) cin >> q;
        }

        rep(i, 0, n) cout << 0;
        rep(i, 0, n) cout << 1;
        cout << 0 << endl;
    }
    return 0;
}