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.awt.List;
import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;


public class N712 {
	static PrintWriter out;
	static Scanner sc;
	static ArrayList<Integer>q,w;
	static ArrayList<Integer>adj[];
	static HashSet<Integer>primesH;
	static boolean prime[];
	//static ArrayList<Integer>a;
	static HashSet<Long>tmp;
	static boolean[]v;
	static int[]a,b,c,d;
	static long l[],dp[][][];
	static char[][]mp;
	static int A,B,n,m,h;
	static long oo=((long)1e9)+7;
	public static void main(String[]args) throws IOException {
		sc=new Scanner(System.in);
		out=new PrintWriter(System.out);
		//A();
	//	B();
	    C();
	//	CC();
		//D();
		//E();
		//minimum for subarrays of fixed length
		//F();
		out.close();
	}
	static long gcd (long a, long b) {
	    return b==0?a:gcd (b, a % b);
	}
	  private static void A() throws IOException {
		  int t=ni();
			while(t-->0) {
				String s=ns();
				boolean x=false;
				for(int i=0;i<s.length();i++) {
					if(s.charAt(i)!='a') {
						x=true;
						break;
					}
				}
				out.println(x?"YES":"NO");
				if(x) {
					if(s.charAt(0)==s.charAt(s.length()-1)&&s.charAt(0)=='a') {
						int c1=0,c2=0;
						for(int i=0;i<s.length();i++) {
							if(s.charAt(i)!='a')break;
							c1++;
						}
						for(int i=s.length()-1;i>=0;i--) {
							if(s.charAt(i)!='a')break;
							c2++;
						}
						if(c1<c2) {
							out.println(s+'a');
						}else {
							out.println('a'+s);
						}
					}else {
						if(s.charAt(0)=='a') {
							out.println('a'+s);
						}else {
							out.println(s+'a');
						}
					}
				}
			}
		
	   }
		static void C() throws IOException {
			int t=ni();
			while(t-->0) {
				int n=ni();
				String s=ns();
				int c=0;
				for(int i=0;i<n;i++) {
					c+=(s.charAt(i)-'0');
				}
				StringBuilder sb1=new StringBuilder();
				StringBuilder sb2=new StringBuilder();
				if(c%2==1||!(s.charAt(0)==s.charAt(n-1)&&s.charAt(0)=='1')) {
					out.println("NO");
				}else {
					boolean o=false;
					int cn=0;
					for(int i=0;i<n;i++) {
						if(s.charAt(i)=='1') {
							cn++;
							if(cn<=c/2) {
								sb1.append("(");
								sb2.append("(");
							}else {
								sb1.append(")");
								sb2.append(")");
							}
							
						}else {
							if(o) {
								sb1.append("(");
								sb2.append(")");
							}else {
								sb1.append(")");
								sb2.append("(");
							}
							o=!o;
						}
					}
					out.println("YES");
					out.println(sb1);
					out.println(sb2);
				}
			}
		}
		
		static void B() throws IOException{
			int t=ni();
			while(t-->0) {
				int n=ni();
				String s=ns(),trgt=ns();
				boolean can=true;;
				int c=0;
				int[]pre1=new int[n],pre2=new int[n];
				for(int i=0;i<n;i++) {
					pre1[i]=(s.charAt(i)-'0')+(i==0?0:pre1[i-1]);
					pre2[i]=(trgt.charAt(i)-'0')+(i==0?0:pre2[i-1]);
				}
				//out.println(Arrays.toString(pre1));
				//out.println(Arrays.toString(pre2));
				if(n%2==1&&s.charAt(n-1)!=trgt.charAt(n-1)||pre1[n-1]!=pre2[n-1]) {
					out.println("NO");
				}else {
					boolean ok=true;
					boolean cons=s.charAt(0)==trgt.charAt(0);
					for(int i=0;i<n;i++) {
						//if(i==n-1&&i%2==0)break;
						int cr=pre1[i];
						boolean x=s.charAt(i)==trgt.charAt(i);
						if(x!=cons) {
							ok=false;break;
						}
						if(i%2==1&&(i+1)/2==cr) {//valid
							if(i<n-1) {
								cons=s.charAt(i+1)==trgt.charAt(i+1);
							}
						}
					}
//					if(x!=cons) {
//						ok=false;
//					}
					out.println(ok?"YES":"NO");
				}
			}
		}
		

	static void D() throws IOException {
		int n=ni();
		//preprc
		Queue<Point>q1=new LinkedList<Point>();
		Queue<Point>q2=new LinkedList<Point>();
		for(int i=1;i<=n;i++) {
			for(int j=1;j<=n;j++) {
				if((i+j)%2==1) {
					q1.add(new Point(i,j));
				}else {
					q2.add(new Point(i,j));
				}
			}
		}
		int neg=-1,x=-1,y=-1;
		for(int i=0;i<n*n;i++) {
			int a=ni();
			if(i==0) {
				neg=a;
				if(a==1) {
					x=2;y=3;
				}else if(a==2) {
					x=1;y=3;
				}else {
					x=1;y=2;
				}
			}
			if(q1.size()==0) {//y or neg
				Point p=q2.poll();
				if(y!=a) {
					out.println(y+" "+p.x+" "+p.y);
				}else {
					out.println(neg+" "+p.x+" "+p.y);
				}
			}else if(q2.size()==0) {// x or neg
				Point p=q1.poll();
				if(x!=a) {
					out.println(x+" "+p.x+" "+p.y);
				}else {
					out.println(neg+" "+p.x+" "+p.y);
				}
			}else {
				if(x!=a) {//x 
					Point p=q1.poll();
					out.println(x+" "+p.x+" "+p.y);
				}else {//y
					Point p=q2.poll();
					out.println(y+" "+p.x+" "+p.y);
				}
			}
			out.flush();
		}
		
	}
	static void E() throws IOException {
		
		
	}
	static class Tri implements Comparable<Tri>{
		int x,y,z;
		public Tri(int x,int y,int z) {
			this.x=x;
			this.y=y;
			this.z=z;
		}
		@Override
		public int compareTo(Tri t) {
			return t.z-z;
		}
		
	}
		private static void paint(char[][] mp, int i) {
		for(int j=0;j<mp.length;j++) {
			mp[j][i]='X';
		}
		if(i>1) {
			for(int a=0;a<mp.length;a++) {
				if(mp[a][i-2]=='X') {
					mp[a][i-1]='X';
					break;
				}
				if(a==mp.length-1) {
					mp[a][i-1]='X';
				}
			}
		}
		if(i<mp[0].length-2) {
			for(int a=0;a<mp.length;a++) {
				if(mp[a][i+2]=='X') {
					mp[a][i+1]='X';
					break;
				}
				if(a==mp.length-1) {
					mp[a][i+1]='X';
				}
			}
		}
		
	}
	static int ni() throws IOException {
		return sc.nextInt();
	}
	static double nd() throws IOException {
		return sc.nextDouble();
	}
	static long nl() throws IOException {
		return  sc.nextLong();
	}
	static String ns() throws IOException {
		return sc.next();
	}
	static int[] nai(int n) throws IOException {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextInt();
		return a;
	}
	static long[] nal(int n) throws IOException {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextLong();
		return a;
	}
	static int[][] nmi(int n,int m) throws IOException{
		int[][]a=new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j]=sc.nextInt();
			}
		}
		return a;
	}

	static long[][] nml(int n,int m) throws IOException{
		long[][]a=new long[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j]=sc.nextLong();
			}
		}
		return a;
	}
	static void o(String x) {
		out.print(x);
	}
	static void ol(String x) {
		out.println(x);
	}
	static void ol(int x) {
		out.println(x);
	}
	static void disp1(int []a) {
		for(int i=0;i<a.length;i++) {
			out.print(a[i]+" ");
		}
		out.println();
	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public boolean hasNext() {return st.hasMoreTokens();}
		public int nextInt() throws IOException {return Integer.parseInt(next());}
		
		public double nextDouble() throws IOException {return Double.parseDouble(next());}
		
		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}
			
		public boolean ready() throws IOException {return br.ready(); }
		

	}
}
