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.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class CodeForces extends Functions {
    public static void  solve() {
        int n = sc.nextInt();
        String str = sc.next();
        int ones = 0;
        for(int i=0;i<n;i++)
            if(str.charAt(i)=='1')ones++;
        if(ones%2==1 || str.charAt(0) == '0' || str.charAt(n-1)=='0')
        {
            System.out.println("NO");
            return;
        }
        System.out.println("YES");
        StringBuilder a = new StringBuilder();
        StringBuilder b = new StringBuilder();
        int currOne = 0;
        boolean toggle = false;
        for(int i=0;i<n;i++){
            if(str.charAt(i)=='1'){
                if(currOne<ones/2){
                    currOne++;
                    a.append("(");
                    b.append("(");
                }
                else{
                    a.append(")");
                    b.append(")");
                }
            }
            else {
                if(toggle){
                    a.append("(");
                    b.append(")");
                }
                else {
                    a.append(')');
                    b.append("(");
                }
                toggle = !toggle;
            }
        }
        System.out.println(a);
        System.out.println(b);

    }





    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        int testCase = 1;
        testCase= sc.nextInt();
        while (testCase-->0){
            solve();
        }
        long end = System.currentTimeMillis();
//        System.out.println("time took in ms : "+(end-start));
    }
    static Scanner sc = new Scanner();


}

class Functions {
    public static int mod = (int)1e9+7;
    public static int INT_MAX = Integer.MAX_VALUE;
    public static int INT_MIN = Integer.MIN_VALUE;
    public static long LONG_MAX = Long.MAX_VALUE;
    public static long LONG_MIN = Long.MIN_VALUE;
    public static double DOUBLE_MAX = Double.MAX_VALUE;
    public static double DOUBLE_MIN = Double.MIN_VALUE;

    public static void sort(int[] a,boolean isAscending){
        ArrayList<Integer> temp = new ArrayList<>();
        for (int j : a) temp.add(j);
        sort(temp,isAscending);
        for(int i=0;i<a.length;i++)a[i] = temp.get(i);
    }
    public static void sort(List T,boolean isAscending){
        if(isAscending)
            Collections.sort(T);
        else Collections.sort(T,Collections.reverseOrder());
    }
    public static long factorial(int n){
        long fact = 1L;
        for(int i=2;i<=n;i++)fact = (fact*i)%mod;
        return fact;
    }

    public  static int ncr(int n, int r){
        // time O(n+r)
        if (r > n)
            return 0;
        long[] inv = new long[r + 1];
        inv[1] = 1;
        // Getting the modular inversion
        // for all the numbers
        // from 2 to r with respect to m
        for (int i = 2; i <= r; i++) {
            inv[i] = mod - (mod / i) * inv[(int) (mod % i)] % mod;
        }
        int ans = 1;
        // for 1/(r!) part
        for (int i = 2; i <= r; i++) {
            ans = (int) (((ans % mod) * (inv[i] % mod)) % mod);
        }
        // for (n)*(n-1)*(n-2)*...*(n-r+1) part
        for (int i = n; i >= (n - r + 1); i--) {
            ans = (int) (((ans % mod) * (i % mod)) % mod);
        }
        return ans;
    }

    public static void reverseArray(int[] a){
        int left = 0;
        int right = a.length-1;
        while (left<right){
            int temp =a[left];
            a[left] = a[right];
            a[right] = temp;
            left++;
            right--;
        }
    }
    public static long findSmallestFactor(int n){
        for(long i=2;i*i<=n;i++)
            if(n%i==0)return i;
        return -1;
    }
}

class Scanner {
    private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private StringTokenizer st = new StringTokenizer("");
    public String next(){
        while (!st.hasMoreTokens())
            try {
                st = new StringTokenizer(br.readLine());
            }catch (IOException e){
                e.printStackTrace();
            }
        return st.nextToken();

    }
    public int nextInt(){return Integer.parseInt(next());}
    public long nextLong(){return Long.parseLong(next());}
    public double nextDouble(){return Double.parseDouble(next());}
    public int[] setIntArray(int n){
        int[] arr =new int[n];
        for(int i=0;i<n;i++)arr[i] = nextInt();
        return arr;
    }
    public Integer[] setIntegerArray(int n){
        Integer[] arr =new Integer[n];
        for(int i=0;i<n;i++)arr[i] = nextInt();
        return arr;
    }
    public long[] setlongArray(int n){
        long[] arr =new long[n];
        for(int i=0;i<n;i++)arr[i] = nextLong();
        return arr;
    }
    public int[][] set2DIntegerMatrix(int row,int col){
        int[][] arr = new int[row][col];
        for(int i=0;i<row;i++)
            for(int j= 0;j<col;j++)
                arr[i][j] = nextInt();
        return arr;
    }
}
