#include <bits/stdc++.h>
#define E puts("");
#define S putchar(' ');
#define debug(x) cout << #x << " = " << x << ' ';
using namespace std;
int t, n;
string s1, s2, s3;
int c10, c11,
c20, c21,
c30, c31;
int cnt;
bool f1, f2, f3;
string max01() {
if (c10 >= c20 && c10 >= c30)
return s1;
else if (c20 >= c10 && c20 >= c30)
return s2;
else
return s3;
}
string max02() {
if ((c10 >= c20 && c10 <= c30) || (c10 <= c20 && c10 >= c30)) return s1;
if ((c20 >= c10 && c20 <= c30) || (c20 <= c10 && c20 >= c30)) return s2;
if ((c30 >= c10 && c30 <= c20) || (c30 <= c10 && c30 >= c20)) return s3;
}
string max11() {
if (c11 >= c21 && c11 >= c31)
return s1;
else if (c21 >= c11 && c21 >= c31)
return s2;
else
return s3;
}
string max12() {
if ((c11 >= c21 && c11 <= c31) || (c11 <= c21 && c11 >= c31)) return s1;
if ((c21 >= c11 && c21 <= c31) || (c21 <= c11 && c21 >= c31)) return s2;
if ((c31 >= c11 && c31 <= c21) || (c31 <= c11 && c31 >= c21)) return s3;
}
int main() {
cin >> t;
while (t--) {
cin >> n >> s1 >> s2 >> s3;
n <<= 1;
c10 = count(s1.begin(), s1.end(), '0');
c11 = count(s1.begin(), s1.end(), '1');
c20 = count(s2.begin(), s2.end(), '0');
c21 = count(s2.begin(), s2.end(), '1');
c30 = count(s3.begin(), s3.end(), '0');
c31 = count(s3.begin(), s3.end(), '1');
f1 = c10 < c11;
f2 = c20 < c21;
f3 = c30 < c31;
cnt = f1 + f2 + f3;
if (cnt <= 1) {
int id = 0;
string t = max01();
string s = max02();
for (int i = 0; i < n; i++) {
if (t[i] == '0' && id < n && s[id] == '1')
cout << 1, id++, i--;
else if (t[i] == s[id])
cout << t[i], id++;
else
cout << t[i];
}
while(id < n) cout << s[id], id++;
} else {
int id = 0;
string t = max11();
string s = max12();
for (int i = 0; i < n; i++) {
if (t[i] == '1' && id < n && s[id] == '0')
cout << 0, id++, i--;
else if (t[i] == s[id])
cout << t[i], id++;
else
cout << t[i];
}
while(id < n) cout << s[id], id++;
}
E;
}
}