#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 200200;

char buffer[N];

string read() {
    scanf("%s", buffer);
    return buffer;
}

string solve(string a, string b, char c) {
    a += c;
    b += c;
    string result = "";
    for (int i = 0, j = 0; i < a.size() || j < b.size(); i++, j++) {
        int c1 = 0, c2 = 0;
        while (i < a.size() && a[i] != c) {
            i++, c1++;
        }
        while (j < b.size() && b[j] != c) {
            j++, c2++;
        }
        result += string(max(c1, c2), c == '1' ? '0' : '1');
        result += c;
    }
    result.pop_back();
    return result;
}

int main() {
    int T;
    cin >> T;

    while (T--) {
        int n;
        scanf("%d", &n);

        string a[3];
        for (int i = 0; i < 3; i++) {
            a[i] = read();
        }

        int cnt[3][2];
        memset(cnt, 0, sizeof cnt);
        for (int i = 0; i < 3; i++) {
            for (char x : a[i]) {
                cnt[i][x - '0']++;
            }
        }

        int maximum[3];
        vector<string> haveMax[2];
        for (int i = 0; i < 3; i++) {
            maximum[i] = (cnt[i][0] <= cnt[i][1]);
            haveMax[maximum[i]].push_back(a[i]);
        }

        string answer;
        if (haveMax[0].size() >= 2) {
            answer = solve(haveMax[0][0], haveMax[0][1], '0');
        } else {
            answer = solve(haveMax[1][0], haveMax[1][1], '1');
        }
        puts(answer.c_str());
    }
}
