A sequence of brackets is called balanced if one can turn it into a valid math expression by adding characters '+' and '1'. For example, sequences '(())()', '()', and '(()(()))' are balanced, while ')(', '(()', and '(()))(' are not.

You are given a binary string s of length n. Construct two balanced bracket sequences a and b of length n such that for all 1≤ i≤ n: 

  * if s_i=1, then a_i=b_i 
  * if s_i=0, then a_i≠ b_i 



If it is impossible, you should report about it.

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 (2≤ n≤ 2⋅ 10^5, n is even).

The next line contains a string s of length n, consisting of characters 0 and 1.

The sum of n across all test cases does not exceed 2⋅ 10^5.

Output

If such two balanced bracked sequences exist, output "YES" on the first line, otherwise output "NO". You can print each letter in any case (upper or lower).

If the answer is "YES", output the balanced bracket sequences a and b satisfying the conditions on the next two lines.

If there are multiple solutions, you may print any.

Example

Input


3
6
101101
10
1001101101
4
1100


Output


YES
()()()
((()))
YES
()()((()))
(())()()()
NO

Note

In the first test case, a="()()()" and b="((()))". The characters are equal in positions 1, 3, 4, and 6, which are the exact same positions where s_i=1.

In the second test case, a="()()((()))" and b="(())()()()". The characters are equal in positions 1, 4, 5, 7, 8, 10, which are the exact same positions where s_i=1.

In the third test case, there is no solution.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.StringTokenizer;
/*
 * Java Input / Output Class using Buffered/ Input Straem
 * Created by @neelbhallabos
 * File Created at: 4/6/2021
 */
public class CF1503A {
	public static BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
	public static StringTokenizer st;
	public static PrintWriter pw = new PrintWriter(System.out);
	final static boolean debugmode = true;
	public static int k = 7; // for 10^9 + k mods.
	public static long STMOD = 1000000000 + k; // 10^9 + k
 
	public static void main(String[] args) throws IOException {
		int tc = getInt();
		for(int t = 0; t < tc;t++) {
			int ansSize = getInt();
			String bString = getString();
			String ans = maybeSolve(bString);
			if(ans == null) {
				submit("NO", false);
			}
			else {
				submit("YES", false);
				submit(ans, false);
			}
		}
		submit();
		
	}
	
	
	private static String maybeSolve(String bString) {
		LinkedList<Integer> values = new LinkedList<Integer>();
		
		StringBuilder a = new StringBuilder();
		StringBuilder b = new StringBuilder();
		
		
		int zeros = 0;
		int ones = 0;
		for(int i = 0; i < bString.length();i++) {
			values.add(bString.charAt(i)-'0');
			if(bString.charAt(i)-'0' == 0) {
				zeros += 1;
			}
			else {
				ones += 1;
			}
		}
		
		if(bString.charAt(0) == '0' || bString.charAt(bString.length()-1) == '0') {
			return null;
		}
		else if(zeros % 2 == 1 || ones % 2 == 1) {
			return null;
		}
		
		boolean lastZeroOpen = false;
		int numK = ones/2;
		for(int c : values) {
			if (c == 0) {
				if(lastZeroOpen) {
					a.append('(');
					b.append(')');
				}
				else {
					a.append(')');
					b.append('(');
				}
				lastZeroOpen = !lastZeroOpen;
			}
			else if(c == 1) {
				if(numK > 0) {
					a.append('(');
					b.append('(');
				}
				else {
					a.append(')');
					b.append(')');
				}
				numK--;
			}
		}
		
		return a.toString()+"\n"+b.toString();
	
		/*
		1001101101
		1001101101
		()((()))()
		(((()))())
		
*/
		
	}


	public static void setInputFile(String fn) throws IOException {
		sc = new BufferedReader(new FileReader(fn));
	}
 
	public static void setOutputFile(String fn) throws IOException {
		pw = new PrintWriter(new BufferedWriter(new FileWriter(fn)));
	}
 
	public static int GCD(int a, int b) {
		if (b == 0)
			return a;
		return GCD(b, a % b);
	}
 
	public static double log(int k, int v) {
		return Math.log(k) / Math.log(v);
	}
 
	public static long longpower(int a, int b) {
		long[] vals = new long[(int) (log(b, 2) + 2)];
		vals[0] = a;
		vals[1] = a * a;
		for (int i = 1; i < vals.length; i++) {
			vals[i] = vals[i - 1] * vals[i - 1];
		}
		long ans = 1;
		int cindex = 0;
		while (b != 0) {
			if (b % 2 == 1) {
				ans *= vals[cindex];
			}
			cindex += 1;
			b /= 2;
		}
		return ans;
 
	}
 
	public static void debug(String toPrint) {
		if (!debugmode) {
			return;
		}
		pw.println("[DEBUG]: " + toPrint);
	}
 
	public static void submit(int[] k, boolean close) {
		pw.println(Arrays.toString(k));
		if (close) {
			pw.close();
		}
	}
 
	public static void submit(int p, boolean close) {
		pw.println(Integer.toString(p));
		if (close) {
			pw.close();
		}
	}
 
	public static void submit(String k, boolean close) {
		pw.println(k);
		if (close) {
			pw.close();
		}
	}
 
	public static void submit(double u, boolean close) {
		pw.println(Double.toString(u));
		if (close) {
			pw.close();
		}
	}
 
	public static void submit(long lng, boolean close) {
		pw.println(Long.toString(lng));
		if (close) {
			pw.close();
		}
 
	}
 
	public static void submit() {
		pw.close();
	}
 
	public static int getInt() throws IOException {
		if (st != null && st.hasMoreTokens()) {
			return Integer.parseInt(st.nextToken());
		}
		st = new StringTokenizer(sc.readLine());
		return Integer.parseInt(st.nextToken());
	}
 
	public static long getLong() throws IOException {
		if (st != null && st.hasMoreTokens()) {
			return Long.parseLong(st.nextToken());
		}
		st = new StringTokenizer(sc.readLine());
		return Long.parseLong(st.nextToken());
	}
 
	public static double getDouble() throws IOException {
		if (st != null && st.hasMoreTokens()) {
			return Double.parseDouble(st.nextToken());
		}
		st = new StringTokenizer(sc.readLine());
		return Double.parseDouble(st.nextToken());
	}
 
	public static String getString() throws IOException {
		if (st != null && st.hasMoreTokens()) {
			return st.nextToken();
		}
		st = new StringTokenizer(sc.readLine());
		return st.nextToken();
	}
 
	public static String getLine() throws IOException {
		return sc.readLine();
	}
 
	public static int[][] readMatrix(int lines, int cols) throws IOException {
		int[][] matrr = new int[lines][cols];
		for (int i = 0; i < lines; i++) {
			for (int j = 0; j < cols; j++) {
				matrr[i][j] = getInt();
			}
		}
		return matrr;
	}
 
	public static int[] readArray(int lines) throws IOException {
		int[] ar = new int[lines];
		for (int i = 0; i < lines; i++)
			ar[i] = getInt();
		return ar;
	}
	
	static class Pair {
		int[] cr;
		int nsteps;
		boolean wasRotated;
		
		public Pair(int[] c, int n, boolean wr) {
			cr = c.clone();
			nsteps = n;
			wasRotated = wr;
		}
	}
 
}