#include <bits/stdc++.h>
#define FASTIO
using namespace std;

using ll = long long;
using Vi = std::vector<int>;
using Vl = std::vector<ll>;
using Pii = std::pair<int, int>;
using Pll = std::pair<ll, ll>;

constexpr int I_INF = std::numeric_limits<int>::max();
constexpr ll L_INF = std::numeric_limits<ll>::max();

template <typename T1, typename T2>
inline bool chmin(T1& a, const T2& b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <typename T1, typename T2>
inline bool chmax(T1& a, const T2& b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template <std::ostream& os = std::cout>
class Prints {
private:
    class __Prints {
    public:
        __Prints(const char* sep, const char* term) : sep(sep), term(term) {}
        template <class... Args>
#if __cplusplus >= 201703L
        auto operator()(const Args&... args) const -> decltype((os << ... << std::declval<Args>()), void()) {
#else
        void operator()(const Args&... args) const {
#endif
            print(args...);
        }
        template <typename T>
#if __cplusplus >= 201703L
        auto pvec(const T& vec, size_t sz) const -> decltype(os << std::declval<decltype(std::declval<T>()[0])>(), void()) {
#else
        void pvec(const T& vec, size_t sz) const {
#endif
            for (size_t i = 0; i < sz; i++)
                os << vec[i] << (i == sz - 1 ? term : sep);
        }
        template <typename T>
#if __cplusplus >= 201703L
        auto pmat(const T& mat, size_t h, size_t w) const -> decltype(os << std::declval<decltype(std::declval<T>()[0][0])>(), void()) {
#else
        void pmat(const T& mat, size_t h, size_t w) const {
#endif
            for (size_t i = 0; i < h; i++)
                for (size_t j = 0; j < w; j++)
                    os << mat[i][j] << (j == w - 1 ? term : sep);
        }

    private:
        const char *sep, *term;
        void print() const { os << term; }
        void print_rest() const { os << term; }
        template <class T, class... Tail>
        void print(const T& head, const Tail&... tail) const { os << head, print_rest(tail...); }
        template <class T, class... Tail>
        void print_rest(const T& head, const Tail&... tail) const { os << sep << head, print_rest(tail...); }
    };

public:
    Prints() {}
    __Prints operator()(const char* sep = " ", const char* term = "\n") const { return __Prints(sep, term); }
};

Prints<> prints;
Prints<std::cerr> prints_err;

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

inline void solve_one() {
    int N;
    cin >> N;
    string S[3];
    for (ll i = 0; i < 3; i++) {
        cin >> S[i];
    }
    Vi group0, group1;
    for (ll i = 0; i < 3; i++) {
        int cnt0 = 0;
        for (auto c : S[i]) {
            if (c == '0') ++cnt0;
        }
        if (cnt0 >= N * 2 - cnt0) {
            group0.emplace_back(i);
        } else {
            group1.emplace_back(i);
        }
    }
    string ans;
    if ((int)group0.size() >= 2) {
        int x0 = group0[0];
        int x1 = group0[1];
        int idx0 = 0, idx1 = 0;
        for (ll i = 0; i < N; i++) {
            while (idx0 < N * 2 && S[x0][idx0] != '0') {
                ans += S[x0][idx0++];
            }
            while (idx1 < N * 2 && S[x1][idx1] != '0') {
                ans += S[x1][idx1++];
            }
            ans += '0';
            ++idx0, ++idx1;
        }
        while (idx0 < N * 2) {
            ans += S[x0][idx0++];
        }
        while (idx1 < N * 2) {
            ans += S[x1][idx1++];
        }
    } else {
        int x0 = group1[0];
        int x1 = group1[1];
        int idx0 = 0, idx1 = 0;
        for (ll i = 0; i < N; i++) {
            while (idx0 < N * 2 && S[x0][idx0] != '1') {
                ans += S[x0][idx0++];
            }
            while (idx1 < N * 2 && S[x1][idx1] != '1') {
                ans += S[x1][idx1++];
            }
            ans += '1';
            ++idx0, ++idx1;
        }
        while (idx0 < N * 2) {
            ans += S[x0][idx0++];
        }
        while (idx1 < N * 2) {
            ans += S[x1][idx1++];
        }
    }
    prints()(ans);
}

void solve() {
    int Q;
    cin >> Q;
    while (Q--) solve_one();
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

int main() {
#ifdef FASTIO
    std::cin.tie(nullptr), std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
#endif
#ifdef FILEINPUT
    std::ifstream ifs("./in_out/input.txt");
    std::cin.rdbuf(ifs.rdbuf());
#endif
#ifdef FILEOUTPUT
    std::ofstream ofs("./in_out/output.txt");
    std::cout.rdbuf(ofs.rdbuf());
#endif
    std::cout << std::setprecision(18) << std::fixed;
    solve();
    std::cout << std::flush;
    return 0;
}
### Prompt

Create a solution in Cpp for the following 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.

### Response

```cpp
#include <bits/stdc++.h>
#define FASTIO
using namespace std;

using ll = long long;
using Vi = std::vector<int>;
using Vl = std::vector<ll>;
using Pii = std::pair<int, int>;
using Pll = std::pair<ll, ll>;

constexpr int I_INF = std::numeric_limits<int>::max();
constexpr ll L_INF = std::numeric_limits<ll>::max();

template <typename T1, typename T2>
inline bool chmin(T1& a, const T2& b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <typename T1, typename T2>
inline bool chmax(T1& a, const T2& b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template <std::ostream& os = std::cout>
class Prints {
private:
    class __Prints {
    public:
        __Prints(const char* sep, const char* term) : sep(sep), term(term) {}
        template <class... Args>
#if __cplusplus >= 201703L
        auto operator()(const Args&... args) const -> decltype((os << ... << std::declval<Args>()), void()) {
#else
        void operator()(const Args&... args) const {
#endif
            print(args...);
        }
        template <typename T>
#if __cplusplus >= 201703L
        auto pvec(const T& vec, size_t sz) const -> decltype(os << std::declval<decltype(std::declval<T>()[0])>(), void()) {
#else
        void pvec(const T& vec, size_t sz) const {
#endif
            for (size_t i = 0; i < sz; i++)
                os << vec[i] << (i == sz - 1 ? term : sep);
        }
        template <typename T>
#if __cplusplus >= 201703L
        auto pmat(const T& mat, size_t h, size_t w) const -> decltype(os << std::declval<decltype(std::declval<T>()[0][0])>(), void()) {
#else
        void pmat(const T& mat, size_t h, size_t w) const {
#endif
            for (size_t i = 0; i < h; i++)
                for (size_t j = 0; j < w; j++)
                    os << mat[i][j] << (j == w - 1 ? term : sep);
        }

    private:
        const char *sep, *term;
        void print() const { os << term; }
        void print_rest() const { os << term; }
        template <class T, class... Tail>
        void print(const T& head, const Tail&... tail) const { os << head, print_rest(tail...); }
        template <class T, class... Tail>
        void print_rest(const T& head, const Tail&... tail) const { os << sep << head, print_rest(tail...); }
    };

public:
    Prints() {}
    __Prints operator()(const char* sep = " ", const char* term = "\n") const { return __Prints(sep, term); }
};

Prints<> prints;
Prints<std::cerr> prints_err;

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

inline void solve_one() {
    int N;
    cin >> N;
    string S[3];
    for (ll i = 0; i < 3; i++) {
        cin >> S[i];
    }
    Vi group0, group1;
    for (ll i = 0; i < 3; i++) {
        int cnt0 = 0;
        for (auto c : S[i]) {
            if (c == '0') ++cnt0;
        }
        if (cnt0 >= N * 2 - cnt0) {
            group0.emplace_back(i);
        } else {
            group1.emplace_back(i);
        }
    }
    string ans;
    if ((int)group0.size() >= 2) {
        int x0 = group0[0];
        int x1 = group0[1];
        int idx0 = 0, idx1 = 0;
        for (ll i = 0; i < N; i++) {
            while (idx0 < N * 2 && S[x0][idx0] != '0') {
                ans += S[x0][idx0++];
            }
            while (idx1 < N * 2 && S[x1][idx1] != '0') {
                ans += S[x1][idx1++];
            }
            ans += '0';
            ++idx0, ++idx1;
        }
        while (idx0 < N * 2) {
            ans += S[x0][idx0++];
        }
        while (idx1 < N * 2) {
            ans += S[x1][idx1++];
        }
    } else {
        int x0 = group1[0];
        int x1 = group1[1];
        int idx0 = 0, idx1 = 0;
        for (ll i = 0; i < N; i++) {
            while (idx0 < N * 2 && S[x0][idx0] != '1') {
                ans += S[x0][idx0++];
            }
            while (idx1 < N * 2 && S[x1][idx1] != '1') {
                ans += S[x1][idx1++];
            }
            ans += '1';
            ++idx0, ++idx1;
        }
        while (idx0 < N * 2) {
            ans += S[x0][idx0++];
        }
        while (idx1 < N * 2) {
            ans += S[x1][idx1++];
        }
    }
    prints()(ans);
}

void solve() {
    int Q;
    cin >> Q;
    while (Q--) solve_one();
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

int main() {
#ifdef FASTIO
    std::cin.tie(nullptr), std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
#endif
#ifdef FILEINPUT
    std::ifstream ifs("./in_out/input.txt");
    std::cin.rdbuf(ifs.rdbuf());
#endif
#ifdef FILEOUTPUT
    std::ofstream ofs("./in_out/output.txt");
    std::cout.rdbuf(ofs.rdbuf());
#endif
    std::cout << std::setprecision(18) << std::fixed;
    solve();
    std::cout << std::flush;
    return 0;
}
```