#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef string str;

#define pb push_back
#define ppp pop_back
#define pii pair<int,int>
#define fi first
#define se second
#define stie std::tie
#define vec vector
#define	forn(i, l, r) for (int i=l; i<=r; i++)
#define forb(i, r, l) for (int i=r; i>=l; i--)
#define emp empty
#define beg begin
#define ins insert
#define cle clear
#define era erase
#define que queue
#define pque priority_queue
#define mset multiset
#define deq deque
#define sta stack
#define con const
#define rsz resize
#define ass assign
#define lowb lower_bound
#define uppb upper_bound

template<class T> void mini(T& a, T b) { a = min(a, b); }
template<class T> void maxi(T& a, T b) { a = max(a, b); }
template<class T1, class T2> ostream& operator<<(ostream &out, pair<T1, T2> a) { return out << a.first << " " << a.second; }
template<class T> ostream& operator<<(ostream& out, vector<T> a) { for (auto& i : a) out << i << " "; return out; }
template<class T> ostream& operator<<(ostream& out, set<T> a) { for (auto& i : a) out << i << " "; return out; }
template<class T> ostream& operator<<(ostream& out, multiset<T> a) { for (auto& i : a) out << i << " "; return out; }
template<class T1, class T2> ostream& operator<<(ostream& out, map<T1, T2> a) { for (auto& i : a) out << i << "\n"; return out; }
template<class T1, class T2> ostream& operator<<(ostream& out, unordered_map<T1, T2> a) { for (auto& i : a) out << i << "\n"; return out; }
template<class T> ostream& operator<<(ostream& out, queue<T> a) { while (!a.empty()) { out << a.front() << " "; a.pop(); } return out; }
template<class T> ostream& operator<<(ostream& out, deque<T> a) { while (!a.empty()) { out << a.front() << " "; a.pop_front(); } return out; }
template<class T> ostream& operator<<(ostream& out, priority_queue<T> a) { while (!a.empty()) { out << a.top() << "\n"; a.pop(); } return out; }
template<class T> void out(T a) { cout << a << endl; }
template<class T1, class T2> void out(T1 a, T2 b) { cout << a << " " << b << endl; }
template<class T1, class T2, class T3> void out(T1 a, T2 b, T3 c) { cout << a << " " << b << " " << c << endl; }
template<class T1, class T2, class T3, class T4> void out(T1 a, T2 b, T3 c, T4 d) { cout << a << " " << b << " " << c << " " << d << endl; }
template<class T> void out(vector<vector<T>> a) { for (vector<T> i : a) out(i); }
template<class T> void out_(T a[], int l, int r) { for (int i = l; i <= r; i++) cout << a[i] << " "; cout << endl; }
void out() { cout << "OK" << endl; }
template<class T> void sort(vector<T>& a) { sort(a.begin(), a.end()); }
template<class T> void uniq(vector<T>& a) { sort(a); a.erase(unique(a.begin(), a.end()), a.end()); }
template<class T> vector<T> set_int(vector<T> a, vector<T> b) { sort(a); sort(b); vector<T> res; set_intersection(a.begin(), a.end(), b.begin(), b.end(), back_inserter(res)); return res; }
clock_t start_time; void start_timer() { start_time = clock(); }
double get_time() { return (double)(clock() - start_time) / CLOCKS_PER_SEC; }
#if __SIZEOF_INT128__ >= 16
typedef __int128 LL;
istream& operator>>(istream& in, __int128& a) { int64_t b; cin >> b; a = b; return in; }
ostream& operator<<(ostream& out, const __int128 a) {
	unsigned __int128 b = a < 0 ? -a : a; char buf[128]; char* c = end(buf); do { --c; *c = "0123456789"[b % 10]; b /= 10; } while (b);
	if (a < 0) { --c; *c = '-'; } int len = end(buf) - c; out.rdbuf()->sputn(c, len); return out;
}
#endif

/*
str sol(str a, str b) {
	str res;
	int n = a.size() / 2;
	for (int i=0; i<2*n; i+=2) {
        str kek = a.substr(i, 2);
        str lol = b.substr(i, 2);
        if (kek == lol) {
            res += kek;
            continue;
        }
		bool one = (kek == "11") || (lol == "11");
		bool zero = (kek == "00") || (lol == "00");
		if (!one) {
			res += "010";
		}
		else if (!zero) {
			res += "101";
		}
		else {
			res += "0011";
		}
	}
	return res;
}
*/

str fuck(str a, str b) {
	int l = 0;
	int r = 0;
	str res;
	while (l < a.size() && r < b.size()) {
		while (l < a.size() && a[l] == '1') {
			res += '1';
			l++;
		}
		while (r < b.size() && b[r] == '1') {
			res += '1';
			r++;
		}
		if (l < a.size() || r < b.size()) {
			res += '0';
			if (l < a.size()) l++;
			if (r < a.size()) r++;
		}
	}
	while (l < a.size()) {
        res += a[l];
        l++;
	}
	while (r < b.size()) {
        res += b[r];
        r++;
	}
	return res;
}

str rev(str a) {
	for (char& c : a) {
		if (c == '0') c = '1';
		else c = '0';
	}
	return a;
}

str sol(str a, str b) {
	str x = fuck(a, b);
	a = rev(a);
	b = rev(b);
	str y = fuck(a, b);
	y = rev(y);
	if (x.size() < y.size()) return x;
	return y;
}

str solve(str a, str b, str c) {
    int n = a.size() / 2;
	str ab = sol(a, b);
	str bc = sol(b, c);
	str ca = sol(c, a);
	str ans = ab;
	if (bc.size() < ans.size()) ans = bc;
	if (ca.size() < ans.size()) ans = ca;
	return ans;
}

void stress() {
	mt19937 rnd;
	while (1) {
		int n = 10;
		str a, b, c;
		forn(i, 0, 2*n-1) {
			a += '0' + (rnd() % 2);
			b += '0' + (rnd() % 2);
			c += '0' + (rnd() % 2);
		}
		str ans = solve(a, b, c);
		if (ans.size() > 3 * n) {
            out(a);
            out(b);
            //out(c);
            out(sol(a, b));
            out(ans);
            exit(0);
		}
	}
}

void Solve() {
	//stress();
	//return;

	int T;
	cin >> T;
	while (T--) {
		str a, b, c;
		int n;
		cin >> n;
		cin >> a >> b >> c;
		str ans = solve(a, b, c);
		cout << ans << "\n";
	}
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef LOCAL
	freopen("input.txt", "r", stdin);
#endif
	start_timer();
	Solve();
	return 0;
}

### Prompt

Please provide a cpp coded solution to the problem described below:

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>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef string str;

#define pb push_back
#define ppp pop_back
#define pii pair<int,int>
#define fi first
#define se second
#define stie std::tie
#define vec vector
#define	forn(i, l, r) for (int i=l; i<=r; i++)
#define forb(i, r, l) for (int i=r; i>=l; i--)
#define emp empty
#define beg begin
#define ins insert
#define cle clear
#define era erase
#define que queue
#define pque priority_queue
#define mset multiset
#define deq deque
#define sta stack
#define con const
#define rsz resize
#define ass assign
#define lowb lower_bound
#define uppb upper_bound

template<class T> void mini(T& a, T b) { a = min(a, b); }
template<class T> void maxi(T& a, T b) { a = max(a, b); }
template<class T1, class T2> ostream& operator<<(ostream &out, pair<T1, T2> a) { return out << a.first << " " << a.second; }
template<class T> ostream& operator<<(ostream& out, vector<T> a) { for (auto& i : a) out << i << " "; return out; }
template<class T> ostream& operator<<(ostream& out, set<T> a) { for (auto& i : a) out << i << " "; return out; }
template<class T> ostream& operator<<(ostream& out, multiset<T> a) { for (auto& i : a) out << i << " "; return out; }
template<class T1, class T2> ostream& operator<<(ostream& out, map<T1, T2> a) { for (auto& i : a) out << i << "\n"; return out; }
template<class T1, class T2> ostream& operator<<(ostream& out, unordered_map<T1, T2> a) { for (auto& i : a) out << i << "\n"; return out; }
template<class T> ostream& operator<<(ostream& out, queue<T> a) { while (!a.empty()) { out << a.front() << " "; a.pop(); } return out; }
template<class T> ostream& operator<<(ostream& out, deque<T> a) { while (!a.empty()) { out << a.front() << " "; a.pop_front(); } return out; }
template<class T> ostream& operator<<(ostream& out, priority_queue<T> a) { while (!a.empty()) { out << a.top() << "\n"; a.pop(); } return out; }
template<class T> void out(T a) { cout << a << endl; }
template<class T1, class T2> void out(T1 a, T2 b) { cout << a << " " << b << endl; }
template<class T1, class T2, class T3> void out(T1 a, T2 b, T3 c) { cout << a << " " << b << " " << c << endl; }
template<class T1, class T2, class T3, class T4> void out(T1 a, T2 b, T3 c, T4 d) { cout << a << " " << b << " " << c << " " << d << endl; }
template<class T> void out(vector<vector<T>> a) { for (vector<T> i : a) out(i); }
template<class T> void out_(T a[], int l, int r) { for (int i = l; i <= r; i++) cout << a[i] << " "; cout << endl; }
void out() { cout << "OK" << endl; }
template<class T> void sort(vector<T>& a) { sort(a.begin(), a.end()); }
template<class T> void uniq(vector<T>& a) { sort(a); a.erase(unique(a.begin(), a.end()), a.end()); }
template<class T> vector<T> set_int(vector<T> a, vector<T> b) { sort(a); sort(b); vector<T> res; set_intersection(a.begin(), a.end(), b.begin(), b.end(), back_inserter(res)); return res; }
clock_t start_time; void start_timer() { start_time = clock(); }
double get_time() { return (double)(clock() - start_time) / CLOCKS_PER_SEC; }
#if __SIZEOF_INT128__ >= 16
typedef __int128 LL;
istream& operator>>(istream& in, __int128& a) { int64_t b; cin >> b; a = b; return in; }
ostream& operator<<(ostream& out, const __int128 a) {
	unsigned __int128 b = a < 0 ? -a : a; char buf[128]; char* c = end(buf); do { --c; *c = "0123456789"[b % 10]; b /= 10; } while (b);
	if (a < 0) { --c; *c = '-'; } int len = end(buf) - c; out.rdbuf()->sputn(c, len); return out;
}
#endif

/*
str sol(str a, str b) {
	str res;
	int n = a.size() / 2;
	for (int i=0; i<2*n; i+=2) {
        str kek = a.substr(i, 2);
        str lol = b.substr(i, 2);
        if (kek == lol) {
            res += kek;
            continue;
        }
		bool one = (kek == "11") || (lol == "11");
		bool zero = (kek == "00") || (lol == "00");
		if (!one) {
			res += "010";
		}
		else if (!zero) {
			res += "101";
		}
		else {
			res += "0011";
		}
	}
	return res;
}
*/

str fuck(str a, str b) {
	int l = 0;
	int r = 0;
	str res;
	while (l < a.size() && r < b.size()) {
		while (l < a.size() && a[l] == '1') {
			res += '1';
			l++;
		}
		while (r < b.size() && b[r] == '1') {
			res += '1';
			r++;
		}
		if (l < a.size() || r < b.size()) {
			res += '0';
			if (l < a.size()) l++;
			if (r < a.size()) r++;
		}
	}
	while (l < a.size()) {
        res += a[l];
        l++;
	}
	while (r < b.size()) {
        res += b[r];
        r++;
	}
	return res;
}

str rev(str a) {
	for (char& c : a) {
		if (c == '0') c = '1';
		else c = '0';
	}
	return a;
}

str sol(str a, str b) {
	str x = fuck(a, b);
	a = rev(a);
	b = rev(b);
	str y = fuck(a, b);
	y = rev(y);
	if (x.size() < y.size()) return x;
	return y;
}

str solve(str a, str b, str c) {
    int n = a.size() / 2;
	str ab = sol(a, b);
	str bc = sol(b, c);
	str ca = sol(c, a);
	str ans = ab;
	if (bc.size() < ans.size()) ans = bc;
	if (ca.size() < ans.size()) ans = ca;
	return ans;
}

void stress() {
	mt19937 rnd;
	while (1) {
		int n = 10;
		str a, b, c;
		forn(i, 0, 2*n-1) {
			a += '0' + (rnd() % 2);
			b += '0' + (rnd() % 2);
			c += '0' + (rnd() % 2);
		}
		str ans = solve(a, b, c);
		if (ans.size() > 3 * n) {
            out(a);
            out(b);
            //out(c);
            out(sol(a, b));
            out(ans);
            exit(0);
		}
	}
}

void Solve() {
	//stress();
	//return;

	int T;
	cin >> T;
	while (T--) {
		str a, b, c;
		int n;
		cin >> n;
		cin >> a >> b >> c;
		str ans = solve(a, b, c);
		cout << ans << "\n";
	}
}

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef LOCAL
	freopen("input.txt", "r", stdin);
#endif
	start_timer();
	Solve();
	return 0;
}

```