/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#ifndef PRELUDE_H
#define PRELUDE_H

#define M_PI 3.14159265358979323846
#define EPS 1e-9

#include <algorithm>
#include <cmath>
#include <numeric>

#include <vector>
#include <set>
#include <map>
#include <queue>

#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>

typedef long long ll;
typedef long double ld;

typedef std::pair<int, int> ii;
typedef std::pair<ll, ll> llll;
typedef std::pair<int, ll> ill;
typedef std::pair<double, double> dd;

typedef std::vector<int> vi;
typedef std::vector<ii> vii;
typedef std::vector<vi> vvi;
typedef std::vector<vvi> vvvi;
typedef std::vector<vii> vvii;
typedef std::vector<ill> vill;
typedef std::vector<vill> vvill;

typedef std::vector<bool> vb;

typedef std::vector<char> vc;
typedef std::vector<std::vector<char>> vvc;

typedef std::vector<ll> vll;
typedef std::vector<vll> vvll;
typedef std::vector<llll> vllll;
typedef std::vector<double> vd;
typedef std::vector<dd> vdd;

typedef std::string ss;
typedef std::vector<ss> vss;
typedef std::vector<vss> vvss;

typedef std::set<int> si;
typedef std::set<ii> sii;
typedef std::set<ll> sll;

typedef std::map<int, int> mii;
typedef std::map<char, int> mci;
typedef std::map<ll, ll> mllll;
typedef std::map<ss, int> mssi;

typedef std::queue<int> qi;

typedef std::vector<std::pair<int, ii>> EdgeList;

#define REP(i,n) for(int i=0;i<n;++i)
#define REPLL(l,n) for(ll l=0;l<n;++l)
#define FOR(i,s,n) for(int i=s;i<=n;++i)
#define FOREACH(it,a) for(auto it=a.begin(); it != a.end(); ++it)

#endif //PRELUDE_H


class ABinaryLiterature {
public:
    void solve(std::istream& in, std::ostream& out) {
        int t;
        in >> t;
        REP(caseNo, t) {
            int n;
            in >> n;
            ss a, b, c;
            in >> a >> b >> c;
            int a0 = 0, a1 = 0, b0 = 0, b1 = 0, c0 = 0, c1 = 0;
            ss f, s;
            char main;
            REP(i, 2*n){
                if (a[i] == '0') { a0++; } else {a1++;}
                if (b[i] == '0') { b0++; } else {b1++;}
                if (c[i] == '0') { c0++; } else {c1++;}
            }
            if (a0 > a1) {
                if (b0 > b1) {
                    f = a;
                    s = b;
                    main = '0';
                }
                else if (c0 > c1) {
                    f = a;
                    s = c;
                    main = '0';
                }
                else {
                    f = b;
                    s = c;
                    main = '1';
                }
            }
            else if (b1 > b0) {
                f = a;
                s = b;
                main = '1';
            }
            else if (c1 > c0) {
                f = a;
                s = c;
                main = '1';
            }
            else {
                f = b;
                s = c;
                main = '0';
            }
            char other = (main == '0' ? '1' : '0');
            ss res(3*n, main);
            int fp = 0, sp = 0, rp = 0;
            while (fp < 2*n && sp < 2*n) {
                if (f[fp] == main && s[sp] == main) {
                    res[rp] = main;
                    rp++;
                    sp++;
                    fp++;
                } else if (f[fp] == other && s[sp] == other) {
                    res[rp] = other;
                    rp++;
                    sp++;
                    fp++;
                } else if (f[fp] == other) {
                    res[rp] = other;
                    fp++;
                    rp++;
                } else {
                    res[rp] = other;
                    sp++;
                    rp++;
                }
            }
            while (fp < 2*n) {
                res[rp] = f[fp];
                rp++; fp++;
            }
            while (sp < 2*n) {
                res[rp] = s[sp];
                rp++; sp++;
            }
            while (rp < 3*n) {
                res[rp] = main;
                rp++;
            }
            out << res << "\n";
        }
    }
};


int main() {
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(NULL);
	std::cout << std::fixed;
	std::cout << std::setprecision(15);

	ABinaryLiterature solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}
