/******************************************************/
/******************************************************/
/**                                                  **/
/**            BISMILLAHIR RAHMANIR RAHIM            **/
/**         REAZ AHAMMED CHOWDHURY - reaziii         **/
/**  Department of Computer Science and Engineering  **/
/*         INSTITUTE OF SCIENCE AND TECHNOLOGY       **/
/**                                                  **/
/******************************************************/
/******************************************************/
#include<bits/stdc++.h>
#define pcase(x)     printf("Case %d: ",x++)
#define fri(f)       for(int i=0;i<f;i++)
#define frj(f)       for(int j=0;j<f;j++)
#define reset(x)     memset(x,-1,sizeof(x))
#define all(x)       x.begin(),x.end()
#define input        freopen("input.txt","r",stdin);
#define output       freopen("output.txt","w",stdout)
#define infi         INT_MAX
#define linfi        LLONG_MAX
#define pii          pair<int,int>
#define pll          pair<ll,ll>
#define mgraph       map<int,vector<int> >
#define pb           push_back
#define clr(x)       memset(x,0,sizeof(x))
#define fro(i,x,y)   for(int i=x;i<y;i++)
#define ech(x,a)     for(auto &x : a)
#define ff           first
#define ss           second
#define vi           vector<int>
#define vl           vector<ll>
#define pi           acos(-1.0)
using namespace std;
template<class T> void read(T& x) {cin >> x;}
template<class H, class... T> void read(H& h, T&... t) {read(h); read(t...);}
template<class A> void read(vector<A>& x) {for (auto &a : x) read(a);}
template<class H> void print(vector<H> &x) {ech(a, x) cout << a << " "; cout << endl;}
template<class P> void debug(P h) {
#ifndef ONLINE_JUDGE
    cerr << h << " ";
#endif
}
template<class W, class... V> void debug(W h, V... t) {
#ifndef ONLINE_JUDGE
    debug(h);
    debug(t...);
    cerr << endl;
#endif

}

typedef long long int ll;
typedef long double ld;
typedef unsigned long long int ull;

bool checkbitt(ll num, int pos) {return (num >> pos) & 1;}
ll setbitt(ll num, ll pos) {return (1 << pos) | num;}
ll resetbitt(ll num, int pos) {if (!checkbitt(num, pos)) return num; else return (1 << pos)^num;}
ll bigmod(ll a, ll b, ll mod) {if (b == 0) return 1; if (b == 1) return a; if (b & 1) {return ((a % mod) * (bigmod(a, b - 1, mod) % mod)) % mod;} ll x = bigmod(a, b / 2, mod); return (x * x) % mod;}
ll geti() {ll x; read(x); return x;}
ll cdiv(ll a, ll b) {ll ret = a / b; if (a % b) ret++; return ret;}
const ll mod =  1e9 + 7;
const ll N   =  2e5 + 10;
int dx[4] = { +0, +0, +1, -1};
int dy[4] = { -1, +1, +0, +0};

//................................___Start from here___...............................//
//................................_____________________..............................//


void printres(string a, string b, char c, char d) {
    // cout << a << endl << b << endl << c << endl << d << endl;
    int cnt = 0;
    vi abc;
    fri(b.size()) {
        if (b[i] == c) {
            abc.pb(cnt);
            cnt = 0;
        }
        else cnt++;
    }

    abc.pb(cnt);

    reverse(all(abc));

    // print(abc);

    fri(a.size()) {
        if (a[i] == c && abc.size()) {
            frj(abc.back()) {
                cout << d;
            }

            abc.pop_back();



        }
        cout << a[i];



    }
    if (abc.size()) {
        fri(abc.back()) {
            cout << d;
        }
    }


    cout << endl;







}



bool hello(string a, string b) {
    int a0 = 0, b0 = 0, a1 = 0, b1 = 0;
    fri(a.size()) {
        if (a[i] == '0')a0++;
        else if (a[i] == '1') a1++;
        if (b[i] == '0') b0++;
        else if (b[i] == '1')b1++;
    }
    int n = a.size() / 2;

    if (a1 >= n && b1 >= n) {
        if (a1 >= b1) {
            printres(a, b, '1', '0');



            return 1;



        }
        else {
            printres(b, a, '1', '0');
            return 1;
        }






    }

    if (a0 >= n && b0 >= n) {
        if (a0 >= b0) {

            printres(a, b, '0', '1');
            return 1;



        }
        else {
            printres(b, a, '0', '1');
            return 1;
        }








    }





    return false;


}





int solve() {
    int n;
    string s[3];
    read(n, s[0], s[1], s[2]);



    fri(3) {
        frj(3) {
            if (i == j) continue;
            if (hello(s[i], s[j])) {
                return 0;
            }

        }
    }






    return 0;
}
int main(int argc, char* argv[]) {

    if (argc <= 1) {
#ifndef ONLINE_JUDGE
        input;
        output;
#endif
#ifdef ONLINE_JUDGE
        ios_base::sync_with_stdio(false);
        cin.tie(0);
#endif
    }


    int cs = 1, cn = 1;
    read(cs);
    while (cs--) {
        solve();

    }
}