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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Map.Entry;

import java.util.Random;
import java.util.TreeSet;

public final class CF_712_D2_C
{


	static boolean verb=true;
	static void log(Object X){if (verb) System.err.println(X);}
	static void log(Object[] X){if (verb) {for (Object U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");System.err.println("");}}
	static void logWln(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");}}
	static void log(int[] X,int L){if (verb) {for (int i=0;i<L;i++) System.err.print(X[i]+" ");System.err.println("");}}
	static void log(long[] X){if (verb) {for (long U:X) System.err.print(U+" ");System.err.println("");}}

	static void logWln(Object X){if (verb) System.err.print(X);}
	static void info(Object o){	System.out.println(o);}
	static void output(Object o){outputWln(""+o+"\n");	}
	static void outputFlush(Object o){try {out.write(""+ o+"\n");out.flush();} catch (Exception e) {}}
	static void outputWln(Object o){try {out.write(""+ o);} catch (Exception e) {}}


	static void logBin(int[] tm) {for (int x:tm) logWln(bin(8,x)+" ");log("");}

	static String bin(int L,int x) {
		String s=Integer.toBinaryString(x);
		while (s.length()<L) s="0"+s;
		return s;
	}

	static long powerMod(long b,long e,long m){
		long x=1;
		while (e>0) {
			if (e%2==1)
				x=(b*x)%m;
			b=(b*b)%m;
			e=e/2;
		}
		return x; 
	}



	static long mod=1000000007;



	// Global vars
	static BufferedWriter out;
	static InputReader reader;

	static int[][] dd={{-1,0},{0,1},{1,0},{0,-1}};

	static int CX=26;

	static long[][] cache;;

	static int NX=3002;


	static class Composite implements Comparable<Composite>{
		int a;
		int b;
		int idx;

		public int compareTo(Composite X) {
			if (a!=X.a)
				return a-X.a;
			if (b!=X.b)
				return b-X.b;
			return idx-X.idx;
		}

		public Composite(int a, int b, int idx) {
			this.a = a;
			this.b = b;
			this.idx = idx;
		}


	}
	
	static boolean isOk(String s) {
		int cur=0;
		for (int i=0;i<s.length();i++) {
			char c=s.charAt(i);
			if (c=='(') {
				cur++;
			} else {
				if (cur<=0)
					return false;
				cur--;
			}
		}
		return cur==0;
	}

	static void test() {
		log("testing");
		for (int w=0;w<100000000;w++) {
			String s=Integer.toBinaryString(w);
			if (s.length()%2==0) {
				solve(s);
			}
		}
		log("done");
	}
	
	static String solve(String s) {
		int L=s.length();
		int tot=0;
		for (int i=0;i<L;i++) {
			int x=s.charAt(i)-'0';
			tot+=1-x;
		}
		if (tot%2==1)
			return "NO";
		if (s.charAt(0)=='0')
			return "NO";
		if (s.charAt(L-1)=='0')
			return "NO";
		char[] a=new char[L];
		char[] b=new char[L];
		Arrays.fill(a, '#');
		Arrays.fill(b, '#');

		int cura=0;
		int curb=0;
		a[0]='(';
		b[0]='(';
		cura++;
		curb++;
		for (int i=1;i<L;i++) {
			if (s.charAt(i)=='1') {
				if (i+1<L && s.charAt(i+1)=='0') {
					if (Math.min(cura, curb)>0 && Math.max(cura, curb)>=2) {
						a[i]=')';
						b[i]=')';
						cura--;
						curb--;
					} else {
						a[i]='(';
						b[i]='(';
						cura++;
						curb++;
					}
				} else {
					if (Math.min(cura, curb)>0) {
						a[i]=')';
						b[i]=')';
						cura--;
						curb--;
					} else {
						a[i]='(';
						b[i]='(';
						cura++;
						curb++;
					}
					
					
				}
			} else {
				if (cura>curb) {
					a[i]=')';
					b[i]='(';
					cura--;
					curb++;
				} else {
					a[i]='(';
					b[i]=')';
					cura++;
					curb--;
				}
			}
			//log(cura+" "+curb+" "+new String(a)+" "+new String(b));
		}
		String A=new String(a);
		String B=new String(b);
		
		/*
		if (!(isOk(A) && isOk(B))) {
			log("problem");
			log(A);
			log(B);
			log(s);
			return "NO";
		}

		if (cura!=0 ||curb!=0) {
			log("errro");
			log(s);
			log(A);
			log(B);
			return "NO";
		}
		*/
		return "YES\n"+A+"\n"+B;

	}



	static String KO="NO";
	static long[] fact;
	static int FX=11;

	static void process() throws Exception {

		out = new BufferedWriter(new OutputStreamWriter(System.out));
		reader = new InputReader(System.in);

		log("hello");
		//test();
		int T=reader.readInt();
		for (int t=0;t<T;t++) {
			int L=reader.readInt();
			String s=reader.readString(L);
			output(solve(s));

		}



		try {
			out.close();
		} catch (Exception Ex) {
		}

	}


	public static void main(String[] args) throws Exception {
		process();

	}

	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}

		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.append((char) c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final String readString(int L) throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder(L);
			do {
				res.append((char) c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg = false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d = (char) c;
			// log("d:"+d);
			if (d == '-') {
				neg = true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			// log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg = false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d = (char) c;
			// log("d:"+d);
			if (d == '-') {
				neg = true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			// log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}

}