#include<bits/stdc++.h> 
using namespace std;
inline int read(){
    int res=0;
    char c;
    bool zf=0;
    while(((c=getchar())<'0'||c>'9')&&c!= '-');
    if(c=='-')zf=1;
    else res=c-'0';
    while((c=getchar())>='0'&&c<='9')res=(res<<3)+(res<<1)+c-'0';
    if(zf)return -res;
    return res;
}
signed main(){
	int T=read();
	while(T--){
		int n=read();
		for(register int i=0;i<3;++i){
			string s;cin>>s;
		}
		for(register int i=1;i<=n;++i){
			putchar('0');
		}
		for(register int i=1;i<=n;++i){
			putchar('1');
		}
		puts("0");
	}
	return 0;
}
#include <iostream>

using namespace std;

void solve() {
  int n;
  string s1,s2,s3;
  cin >> n >> s1 >> s2 >> s3;
  cout << string(n,'0') << string(n,'1') << '0' << endl;
}

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