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 PYTHON3):

Solution:
import sys
import math
import heapq
import bisect
from collections import Counter
from collections import defaultdict
from io import BytesIO, IOBase
import string


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
        self.BUFSIZE = 8192

    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")


def get_int():
    return int(input())


def get_ints():
    return list(map(int, input().split(' ')))


def get_int_grid(n):
    return [get_ints() for _ in range(n)]


def get_str():
    return input().strip()


def get_strs():
    return get_str().split(' ')


def flat_list(arr):
    return [item for subarr in arr for item in subarr]


def yes_no(b):
    if b:
        return "YES"
    else:
        return "NO"


def binary_search(good, left, right, delta=1, right_true=False):
    """
    Performs binary search
    ----------
    Parameters
    ----------
    :param good: Function used to perform the binary search
    :param left: Starting value of left limit
    :param right: Starting value of the right limit
    :param delta: Margin of error, defaults value of 1 for integer binary search
    :param right_true: Boolean, for whether the right limit is the true invariant
    :return: Returns the most extremal value interval [left, right] which is good function evaluates to True,
            alternatively returns False if no such value found
    """

    limits = [left, right]
    while limits[1] - limits[0] > delta:
        if delta == 1:
            mid = sum(limits) // 2
        else:
            mid = sum(limits) / 2
        if good(mid):
            limits[int(right_true)] = mid
        else:
            limits[int(~right_true)] = mid
    if good(limits[int(right_true)]):
        return limits[int(right_true)]
    else:
        return False


def prefix_sums(a):
    p = [0]
    for x in a:
        p.append(p[-1] + x)
    return p


def is_pall(s):
    n = len(s)
    for i in range(n // 2):
        if s[i] != s[n - 1 - i]:
            return False
    return True


def solve_a():
    s = get_str()
    n = len(s)
    s_set = set(s)
    if s_set == {'a'}:
        return print("NO")
    else:
        print("YES")
        if is_pall(s + 'a'):
            print('a' + s)
        else:
            print(s + 'a')


def solve_b():
    n = get_int()
    a = list(get_str())
    b = list(get_str())

    if a.count('1') != b.count('1'):
        return False

    a_cnt = [0, 0]
    prev = 0

    for i in range(n):
        a_cnt[int(a[i])] += 1
        if a_cnt[0] == a_cnt[-1]:
            same = False
            diff = False
            for j in range(prev + 1, i + 1):
                if a[j] != b[j]:
                    diff = True
                else:
                    same = True
            if same and diff:
                return False
            prev = i
    for j in range(prev + 1, n):
        if a[j] != b[j]:
            return False
    return True


def brack_seq_good(seq):
    opens = 0
    for i, char in enumerate(seq):
        if char == '(':
            opens += 1
        else:
            opens -= 1
        if opens < 0:
            return False
    return opens == 0


def solve_c():
    n = get_int()
    s = get_str()
    x = s.count("1")
    if x % 2 == 1:
        print("NO")
        return
    open_u, open_v = 0, 0
    u = []
    v = []
    ones = 0

    for i, char in enumerate(s):
        if char == '1':
            if ones < x // 2:
                u.append('(')
                v.append('(')
                open_u += 1
                open_v += 1
            else:
                u.append(')')
                v.append(')')
                open_u -= 1
                open_v -= 1
            ones += 1
        else:
            if open_u < open_v:
                u.append('(')
                v.append(')')
                open_u += 1
                open_v -= 1
            else:
                u.append(')')
                v.append('(')
                open_u -= 1
                open_v += 1
        if min(open_u, open_v) < 0:
            print("NO")
            return

    if max(open_u, open_v):
        print("NO")
        return

    print("YES")
    print("".join(u))
    print("".join(v))
    return





    if s[0] != '1':
        print("NO")
        return
    elif s[-1] != '1':
        print("NO")
        return
    elif s.count('1') % 2 != 0:
        print("NO")
        return
    else:





        candidates = []
        candidates.append(["(", ")"] * (n // 2))
        candidates.append(["("] * (n // 2) + [")"] * (n // 2))

        for x in candidates:
            y = []
            for i, char in enumerate(x):
                if s[i] == '1':
                    y.append(char)
                else:
                    if char == '(':
                        y.append(')')
                    else:
                        y.append('(')

            if brack_seq_good(y):
                print("YES")
                print(''.join(x))
                print(''.join(y))
                return


def solve_d():
    n = get_int()
    grid = [(i + 1, j + 1) for i in range(n) for j in range(n)]
    odds = [(i, j) for (i, j) in grid if (i + j) % 2]
    evens = [(i, j) for (i, j) in grid if (i + j) % 2 == 0]

    def turn():
        a = get_int()
        if a == 1:
            if evens:
                i, j = evens.pop()
                print(2, i, j)
                sys.stdout.flush()
                return
            elif odds:
                i, j = odds.pop()
                print(3, i, j)
                sys.stdout.flush()
                return
        elif a == 2:
            if odds:
                i, j = odds.pop()
                print(1, i, j)
                sys.stdout.flush()
                return
            elif evens:
                i, j = evens.pop()
                print(3, i, j)
                sys.stdout.flush()
                return
        elif a == 3:
            if odds:
                i, j = odds.pop()
                print(1, i, j)
                sys.stdout.flush()
                return
            elif evens:
                i, j = evens.pop()
                print(2, i, j)
                sys.stdout.flush()
                return

    for i in range(n ** 2):
        turn()

    return



t = get_int()
for _ in range(t):
    solve_c()