Problem: A bitstring is a string that contains only the characters 0 and 1.

Koyomi Kanou is working hard towards her dream of becoming a writer. To practice, she decided to participate in the Binary Novel Writing Contest. The writing prompt for the contest consists of three bitstrings of length 2n. A valid novel for the contest is a bitstring of length at most 3n that contains at least two of the three given strings as subsequences.

Koyomi has just received the three prompt strings from the contest organizers. Help her write a valid novel for the contest.

A string a is a subsequence of a string b if a can be obtained from b by deletion of several (possibly, zero) characters.

Input

The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases.

The first line of each test case contains a single integer n (1 ≤ n ≤ 10^5).

Each of the following three lines contains a bitstring of length 2n. It is guaranteed that these three strings are pairwise distinct.

It is guaranteed that the sum of n across all test cases does not exceed 10^5.

Output

For each test case, print a single line containing a bitstring of length at most 3n that has at least two of the given bitstrings as subsequences.

It can be proven that under the constraints of the problem, such a bitstring always exists.

If there are multiple possible answers, you may output any of them.

Example

Input


2
1
00
11
01
3
011001
111010
010001


Output


010
011001010

Note

In the first test case, the bitstrings 00 and 01 are subsequences of the output string: 010 and 010. Note that 11 is not a subsequence of the output string, but this is not required.

In the second test case all three input strings are subsequences of the output string: 011001010, 011001010 and 011001010.

Solution (in CPP):

Solution:
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <string>
#include <fstream>
#include <vector>
#include <queue>
#include <stack>
#include <sstream>
#include <list>
#include <map>
#include <set>
#include <limits>
#include <random>
#include <functional>
#include <unordered_set>
#include <unordered_map>

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

#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>

using namespace std;

const int N = 110;
const int M = 3;
const int MOD = 1000000007;
const int INF = 1009000999;
const ll LINF = (1ll << 60) + 1337;
const ld EPS = 0.00000001;

string comp(string& a, string& b, char e, int c) {
    vector<int> kek(c + 1, 0);
    int cnt = 0;
    for (int i = 0; i < a.size(); i++) {
        if (a[i] == e)cnt++;
        else kek[cnt]++;
    }
    cnt = 0;
    for (int i = 0; i < b.size(); i++) {
        if (b[i] == e)cnt++;
        else kek[cnt]++;
    }
    string res;
    for (int i = 0; i <= c; i++) {
        for (int j = 0; j < kek[i]; j++) {
            res += '0' + (1 - (e - '0'));
        }
        if (i != c) res += e;
    }

    return res;
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifdef _DEBUG
    freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("line3.in", "r", stdin); freopen("line3.out", "w", stdout);
#endif
    int tt;
    cin >> tt;
    while (tt--) {
        int n;
        cin >> n;
        string s[M];
        for (int i = 0; i < M; i++) cin >> s[i];
        string ans;
        for (int i = 0; i < M && ans.empty(); i++) {
            for (int j = i + 1; j < M && ans.empty(); j++) {
                int ci[2] = { 0,0 }, cj[2] = { 0,0 };
                for (int k = 0; k < 2 * n; k++) {
                    ci[s[i][k] - '0']++;
                    cj[s[j][k] - '0']++;
                }
                if (min(ci[0], cj[0]) >= n) {
                    ans = comp(s[i], s[j], '0', max(ci[0], cj[0]));
                }
                if (min(ci[1], cj[1]) >= n) {
                    ans = comp(s[i], s[j], '1', max(ci[1], cj[1]));
                }
            }
        }
        cout << ans << "\n";
    }
}


/*
    Important stuff
    - int overflow
    - array bounds
    - special cases (n=1, max n) maybe adhoc problem
    - doubles are read for a long time (4 * 10 ^ 5 danger GNU vs MS ICPC 2020 1/4)
    - don't get stuck on one approach
    - don't get stuck on one problem
    - recheck submissions if near the end of the tournament and there is nothing to do
    - do something instead of nothing and stay organized
*/