Problem: 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.

Solution (in JAVA):

Solution:
//package sept;
 
import java.io.*;
import java.util.*;
 
public class TimePass {
    InputStream is;
    PrintWriter out;
    String INPUT = "";
    //boolean codechef=true;
    // String prodKey = "Av#/lL{OyEKiLR+/Ce%(w]^J65;XZe8FVb]]<931_=80E[BVnU^@4xu*J%KG3,CRqIZrUN~JJ+*6QC*CyBd>'$;>O"onO.bQ%{L}";
    boolean codechef=true;
    
    void solve()
    {
        int t=ni();
        while(t-->0){
            int n=ni();
            char[] a=ns().toCharArray();
            int cnt=0;
            for(int i:a){
                if (i=='0')cnt++;
            }
            if (a[0]=='0' || a[n-1]=='0' || cnt%2!=0 || n%2!=0){
                out.println("NO");
                continue;
            }
            Stack<Character> l1 = new Stack<>();
            l1.push('(');
            Stack<Character> l2 = new Stack<>();
            l2.push('(');
            boolean check=false;
            StringBuffer sb1=new StringBuffer();
            StringBuffer sb2=new StringBuffer();
            sb1.append('(');
            sb2.append('(');
            int cnt1=0,cnt0=0;
            for(int i=1;i<n;i++) {
                if (a[i]=='0') {
                    cnt0++;
                    if (cnt0%2==1) {
                        sb1.append('(');
                        sb2.append(')');
                    } else{
                        sb1.append(')');
                        sb2.append('(');
                    }
                } else {
                    cnt1++;
                    if (i==n-1) {
                        sb1.append(')');
                        sb2.append(')');
                    }
                    
                    else if (cnt1%2==1) {
                        sb1.append('(');
                        sb2.append('(');
                    } else {
                        sb1.append(')');
                        sb2.append(')');
                    }
                }
            }
            // out.println(sb1);
            // out.println(sb2);
            // if (l1.size() > 0 || l2.size()>0 || check){
            //     out.println("NO");
            //     continue;
            // }
            out.println("YES");
            out.println(sb1);
            out.println(sb2);
        }
    }
    static boolean check(String s) {
        boolean check=true;
        for(int i=0;i<s.length()/2;i++){
            if (s.charAt(i) != s.charAt(s.length()-1-i)) {
                check=false;
                break;
            }
        }
        return check;
    }
 
    static int MAX=1500;
    
    static int prime[], countdiv[]; 
    
    static int[] getDivisorsArray() {
        int n=20000005;
        int[] mind = new int[n];
        Arrays.fill(mind, -1);
        for(int i=2;i<n;i++){
            if (mind[i]==-1){
                for(int j=i;j<n;j+=i){
                    if (mind[j]==-1){
                        mind[j]=i;
                    }
                }
            }
        }
        // int[] nod = new int[n];
        // for(int i=2;i<n;i++){
        //     int prod = i/mind[i];
        //     if (mind[i] != mind[prod]) {
        //         nod[i] = nod[prod] + 1;
        //     } else {
        //         nod[i] = nod[prod];
        //     }
        // }
        return mind;
    }
      
    // Simple sieve to find smallest prime factors of numbers 
    // smaller than MAX 
    void SieveOfEratosthenes() 
    { 
        for (int i = 2; i * i < MAX; ++i) 
        { 
            if (prime[i]==0) 
                for (int j = i * i; j < MAX; j += i) 
                    prime[j] = i; 
        } 
      
        // Prime number will have same divisor 
        for (int i = 1; i < MAX; ++i) 
            if (prime[i]==0) 
                prime[i] = i; 
    } 
      
    // Returns length of the largest subsequence 
    // with GCD more than 1. 
    int largestGCDSubsequence(int arr[], int n) 
    { 
        int ans = 0; 
        for (int i=0; i < n; ++i) 
        { 
            int element = arr[i]; 
      
            // Fetch total unique prime divisor of element 
            while (element > 1) 
            { 
                int div = prime[element]; 
      
                // Increment count[] of Every unique divisor 
                // we get till now 
                ++countdiv[div]; 
      
                // Find maximum frequency of divisor 
                ans = Math.max(ans, countdiv[div]); 
      
                while (element % div==0) 
                    element /= div; 
            } 
        } 
      
        return ans; 
    } 
      
    
    static boolean check(int x)
    {
        char[] a=(""+x).toCharArray();
        int s=0;
        for(int i=0;i<a.length;i++)
        {
            s+=a[i]-'0';
            s%=3;
        }
        if(s==0)return true;
        return false;
    }
 
    static int[][] packD(int n,int[] from,int[] to)
    {
        int[][] g=new int[n][];
        int[] p=new int[n];
        for(int f:from)
        {
            p[f]++;
        }
        int m=from.length;
        for(int i=0;i<n;i++)
        {
            g[i]=new int[p[i]];
        }
        for(int i=0;i<m;i++)
        {
            g[from[i]][--p[from[i]]]=to[i];
        }
        return g;
    }
        
    static class Pair
    {
        int a,b;
        public Pair(int a,int b)
        {
            this.a=a;
            this.b=b;
        }
    }
    
    static long lcm(int a,int b)
    {
        long val=a;
        val*=b;
        return (val/gcd(a,b));
    }
    
    static long gcd(long a,long b)
    {
        if(a==0)return b;
        return gcd(b%a,a);
    }
    
    static int pow(int a, int b, int p)
    {
        long ans = 1, base = a;
        while (b!=0)
        {
            if ((b & 1)!=0)
            {
                ans *= base;
                ans%= p;
            }
            base *= base;
            base%= p;
            b >>= 1;
        }
        return (int)ans;
    }
 
    static int inv(int x, int p)
    {
        return pow(x, p - 2, p);
    }
 
    
    void run() throws Exception
    {
        if(codechef)oj=true;
        is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);
        
        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis()-s+"ms");
    }
    
    public static void main(String[] args) throws Exception {new TimePass().run();}
    
    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;
    
    private int readByte()
    {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }
    
    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
    
    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }
    
    private String ns()
    {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    
    private char[] ns(int n)
    {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }
    
    private char[][] nm(int n, int m)
    {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }
    
    private int[] na(int n)
    {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }
    
    private int ni()
    {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }
        
        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    
    private long nl()
    {
        long num = 0;
        int b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }
        
        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    
    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}