You are given two bracket sequences (not necessarily regular) s and t consisting only of characters '(' and ')'. You want to construct the shortest regular bracket sequence that contains both given bracket sequences as subsequences (not necessarily contiguous).

Recall what is the regular bracket sequence:

  * () is the regular bracket sequence; 
  * if S is the regular bracket sequence, then (S) is a regular bracket sequence; 
  * if S and T regular bracket sequences, then ST (concatenation of S and T) is a regular bracket sequence. 



Recall that the subsequence of the string s is such string t that can be obtained from s by removing some (possibly, zero) amount of characters. For example, "coder", "force", "cf" and "cores" are subsequences of "codeforces", but "fed" and "z" are not.

Input

The first line of the input contains one bracket sequence s consisting of no more than 200 characters '(' and ')'.

The second line of the input contains one bracket sequence t consisting of no more than 200 characters '(' and ')'.

Output

Print one line — the shortest regular bracket sequence that contains both given bracket sequences as subsequences (not necessarily contiguous). If there are several answers, you can print any.

Examples

Input


(())(()
()))()


Output


(())()()


Input


)
((


Output


(())


Input


)
)))


Output


((()))


Input


())
(()(()(()(


Output


(()()()(()()))
import java.util.*;
import java.io.*;
public class f {
	static int n, m, maxD = 202;
	static char[] a, b;
	static int[][][] dp;
	static char[][][] best;
	public static void main(String[] args) {
		FS sc = new FS();
		a = (sc.next() + "-").toCharArray();
		b = (sc.next() + "-").toCharArray();
		n = a.length;
		m = b.length;
		dp = new int[n][m][maxD + 1];
		for(int[][] z : dp) {
			for(int[] y : z) Arrays.fill(y, -1);
		}
		best = new char[n][m][maxD + 1];
		
		dp[n - 1][m - 1][0] = 0;
		best[n - 1][m - 1][0] = '\n';
		go(0, 0, 0);
		
		int ai = 0, bi = 0, d = 0;
		while(!(ai == n - 1 && bi == m - 1 && d == 0)) {
			char curr = best[ai][bi][d];
			System.out.print(curr);
			
			if(a[ai] == curr) ++ai;
			if(b[bi] == curr) ++bi;
			if(curr == '(') ++d;
			else --d;
		}
		System.out.println();
	}
	static int go(int ai, int bi, int d) {
		if(dp[ai][bi][d] != -1) return dp[ai][bi][d];
		
		int open = Integer.MAX_VALUE / 2;
		if(a[ai] == '(' || b[bi] == '(' || d == 0) {
			int aa = ai + (a[ai] == '(' ? 1 : 0);
			int bb = bi + (b[bi] == '(' ? 1 : 0);
			open = 1 + go(aa, bb, d + 1);
		}
		int close = Integer.MAX_VALUE / 2;
		if(d > 0) {
			int aa = ai + (a[ai] == ')' ? 1 : 0);
			int bb = bi + (b[bi] == ')' ? 1 : 0);
			close = 1 + go(aa, bb, d - 1);
		}
		
		if(open < close) best[ai][bi][d] = '(';
		else best[ai][bi][d] = ')';
		return dp[ai][bi][d] = Math.min(open, close);
	}
	static class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch(Exception e) {}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
}