#include <cstdio>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <functional>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
// typedef 
using LL = long long;
using PII = std::pair<int, int>;
// conatiner declaration
#define INT_VEC(NAME_, SIZE_) \
  std::vector<int> (NAME_)(SIZE_)
#define INT_VEC_INIT(NAME_, SIZE_, VALUE_) \
  std::vector<int> (NAME_)(SIZE_, VALUE_)
#define INT_VEC_2D(NAME_, SIZE_N, SIZE_M) \
  std::vector<std::vector<int>> (NAME_)(SIZE_N, std::vector<int>(SIZE_M))
#define INT_VEC_2D_INIT(NAME_, SIZE_N, SIZE_M, VALUE_) \
  std::vector<std::vector<int>> (NAME_)(SIZE_N, std::vector<int>(SIZE_M, VALUE_))

// simple I/O
#define READ_VEC(NAME_, START, TERMINAL) \
  for (int i=(START); i<(TERMINAL); ++i) { scanf("%d", &(NAME_)[i]); }
int nxt () {
    int x;
    scanf("%d", &x);
    return x;
}
LL nxtll () {
    LL x;
    scanf("%lld", &x);
    return x;
}
// range
#define all(x)\
  std::begin(x), std::end(x)
///////////////////////////////////////////////////////////////////////////////
void solve() {
    int n = nxt();
    std::string ar[3];
    std::cin >> ar[0] >> ar[1] >> ar[2];
    ar[0] += '!';
    ar[1] += '@';
    ar[2] += '#';

    int index[3] = {};
    int satisfied = -1;
    int total_satisfied = 0;
    std::string answer;
    while (total_satisfied < 2) {
        if (satisfied == -1) {
            int count[2] = {};
            count[(int)(ar[0][index[0]]) - '0']++;
            count[(int)(ar[1][index[1]]) - '0']++;
            count[(int)(ar[2][index[2]]) - '0']++;
            if (count[0] > count[1]) {
                answer += '0';
                if (ar[0][index[0]] == '0') {
                    index[0]++;
                    if (index[0] == 2*n) {
                        satisfied = 0;
                        total_satisfied++;
                    }
                }
                if (ar[1][index[1]] == '0') {
                    index[1]++;
                    if (index[1] == 2*n) {
                        satisfied = 1;
                        total_satisfied++;
                    }
                }
                if (ar[2][index[2]] == '0') {
                    index[2]++;
                    if (index[2] == 2*n) {
                        satisfied = 2;
                        total_satisfied++;
                    }
                }
            } else {
                answer += '1';
                if (ar[0][index[0]] == '1') {
                    index[0]++;
                    if (index[0] == 2*n) {
                        satisfied = 0;
                        total_satisfied++;
                    }
                }
                if (ar[1][index[1]] == '1') {
                    index[1]++;
                    if (index[1] == 2*n) {
                        satisfied = 1;
                        total_satisfied++;
                    }
                }
                if (ar[2][index[2]] == '1') {
                    index[2]++;
                    if (index[2] == 2*n) {
                        satisfied = 2;
                        total_satisfied++;
                    }
                }
            }
        } else {
            int who;
            if (satisfied == 0) {
                who = index[1] > index[2] ? 1 : 2;
            }
            if (satisfied == 1) {
                who = index[0] > index[2] ? 0 : 2;
            }
            if (satisfied == 2) {
                who = index[0] > index[1] ? 0 : 1;
            }
            while (index[who] < 2*n) {
                answer += ar[who][index[who]++];
            }
            total_satisfied++;
        } 
    }
    std::cout << answer << "\n";
}
int main ()
{
    int t = nxt();
    while (t--) {
        solve();
    }
}
