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 JAVA):

Solution:
import java.util.*;
import java.io.*;

public class CFD {
  BufferedReader br;
  PrintWriter out;
  StringTokenizer st;
  boolean eof;
  private static final long MOD = 1000L * 1000L * 1000L + 7;
  private static final int[] dx = {0, -1, 0, 1};
  private static final int[] dy = {1, 0, -1, 0};
  private static final String yes = "Yes";
  private static final String no = "No";

  void solve() {
    int T = nextInt();
//    int T = 1;
    for (int i = 0; i < T; i++) {
      helper();
    }
  }

  int n;
  void helper() {
    n = nextInt();
    char[][] mat = new char[3][];
    for (int i = 0; i < 3; i++) {
      mat[i] = nextString().toCharArray();
    }

    for (int i = 0; i < 3; i++) {
      for (int j = i + 1; j < 3; j++) {
        String res = find(mat[i], mat[j]);
        if (res.length() > 0) {
          outln(res);
          return;
        }
      }
    }
  }

  String find(char[] a, char[] b) {
    int x0 = 0;
    int x1 = 0;
    for (char c : a) {
      if (c == '0') {
        x0++;
      } else {
        x1++;
      }
    }
    int y0 = 0;
    int y1 = 0;
    for (char c : b) {
      if (c == '0') {
        y0++;
      } else {
        y1++;
      }
    }
    int min = Math.min(x0, y0);
    if (min >= n) {
      return comb(a, b, '0', min);
    }
    min = Math.min(x1, y1);
    if (min >= n) {
      return comb(a, b, '1', min);
    }
    return "";
  }

  String comb(char[] a, char[] b, char target, int cnt) {
    boolean[] f1 = label(a, target, cnt);
    boolean[] f2 = label(b, target, cnt);
    StringBuilder sb = new StringBuilder();
    int i = 0;
    int j = 0;
    int len = a.length;
    while (i < len || j < len) {

      if (i < len && j < len) {
        if (f1[i] && f2[j]) {
          sb.append(target);
          i++;
          j++;
        } else if (f1[i] && !f2[j]) {
          sb.append(b[j]);
          j++;
        } else if (!f1[i] && f2[j]) {
          sb.append(a[i]);
          i++;
        } else {
          sb.append(a[i]);
          i++;
        }
      } else if (i >= len) {
        sb.append(b[j]);
        j++;
      } else if (j >= len) {
        sb.append(a[i]);
        i++;
      }
    }

    return sb.toString();
  }

  boolean[] label(char[] arr, char target, int cnt) {
    int cur = 0;
    boolean[] res = new boolean[arr.length];
    for (int i = 0; i < arr.length; i++) {
      if (cur >= cnt) {
        break;
      }
      res[i] = arr[i] == target;
      if (res[i]) {
        cur++;
      }
    }
    return res;
  }

  void shuffle(long[] a) {
    int n = a.length;
    for(int i = 0; i < n; i++) {
      int r = i + (int) (Math.random() * (n - i));
      long tmp = a[i];
      a[i] = a[r];
      a[r] = tmp;
    }
  }
  long gcd(long a, long b) {
    while(a != 0 && b != 0) {
      long c = b;
      b = a % b;
      a = c;
    }
    return a + b;
  }
  private void outln(Object o) {
    out.println(o);
  }
  private void out(Object o) {
    out.print(o);
  }
  private void formatPrint(double val) {
    outln(String.format("%.9f%n", val));
  }
  public CFD() {
    br = new BufferedReader(new InputStreamReader(System.in));
    out = new PrintWriter(System.out);
    solve();
    out.close();
  }
  public static void main(String[] args) {
    new CFD();
  }

  public long[] nextLongArr(int n) {
    long[] res = new long[n];
    for(int i = 0; i < n; i++)
      res[i] = nextLong();
    return res;
  }
  public int[] nextIntArr(int n) {
    int[] res = new int[n];
    for(int i = 0; i < n; i++)
      res[i] = nextInt();
    return res;
  }
  public String nextToken() {
    while (st == null || !st.hasMoreTokens()) {
      try {
        st = new StringTokenizer(br.readLine());
      } catch (Exception e) {
        eof = true;
        return null;
      }
    }
    return st.nextToken();
  }
  public String nextString() {
    try {
      return br.readLine();
    } catch (IOException e) {
      eof = true;
      return null;
    }
  }
  public int nextInt() {
    return Integer.parseInt(nextToken());
  }
  public long nextLong() {
    return Long.parseLong(nextToken());
  }
  public double nextDouble() {
    return Double.parseDouble(nextToken());
  }
}