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

Solution:
#include <bits/stdc++.h>


namespace fastio
{
  #ifdef _WIN32
  #define getchar_nolock(x) _getchar_nolock(x)
  #define putchar_nolock(x) _putchar_nolock(x)
  #else
  #define getchar_nolock(x) getchar_unlocked(x)
  #define putchar_nolock(x) putchar_unlocked(x)
  #endif

  template <typename Type>
  inline typename std::enable_if<!std::is_unsigned<Type>::value, void>::type read_int(Type &x)
  {
    Type f = 1; x = 0;
    char ch = getchar_nolock();
    while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar_nolock(); }
    while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar_nolock(); }
    x = x * f;
  }

  template <typename Type>
  inline typename std::enable_if<std::is_unsigned<Type>::value, void>::type read_int(Type &x)
  {
    x = 0;
    char ch = getchar_nolock();
    while (ch < '0' || ch > '9') { ch = getchar_nolock(); }
    while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar_nolock(); }
  }

  template <typename Type, typename... Args>
  void read_int(Type &s, Args&... args)
  {
    read_int(s);
    read_int(args...);
  }

  template <typename Type>
  inline typename std::enable_if<std::is_integral<Type>::value, void>::type write(const Type &num)
  {
    Type nn = num;
    if (nn < 0)
      putchar_nolock('-'), nn = -nn;
    if (!nn)
      return(void)putchar_nolock('0');
    Type tt = nn, cnt = 0, rev = 0;
    while (!(tt % 10)) {  ++cnt, tt /= 10;  } do { rev = rev * 10 + nn % 10; }
    while (nn /= 10);
    do {  putchar_nolock(rev % 10 + 48);  } while (rev /= 10);
    while (cnt--) putchar_nolock('0');
  }

  template <>
  inline void write(const char &ch)
  {
    putchar_nolock(ch);
  }

  template <typename Type, typename... Args>
  void write(const Type &nn, const Args&... args)
  {
    write(nn);
    putchar_nolock(' ');
    write(args...);
  }

  inline void use_iostream() noexcept
  {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    return;
  }

}  // namespace fastio


namespace debug
{
  
  template <typename A, typename B>
  std::string to_string(std::pair<A, B> p);
  
  template <typename A, typename B, typename C>
  std::string to_string(std::tuple<A, B, C> p);
  
  template <typename A, typename B, typename C, typename D>
  std::string to_string(std::tuple<A, B, C, D> p);
  
  std::string to_string(const std::string &ss) {  return '"' + ss + '"';  }
  
  std::string to_string(const char* ss) {  return to_string((std::string) ss);  }

  template <typename A>
  typename std::enable_if<std::is_integral<A>::value, std::string>::type to_string(const A &nn)
  {  return std::to_string(nn);  }
  
  std::string to_string(const bool b) {  return (b ? "true" : "false");  }
  
  template <size_t N>
  std::string to_string(const std::bitset<N> &v)
  {
    std::string res = "";
    for (size_t i = 0; i < N; i++)
      res += static_cast<char>('0' + v[i]);
    return res;
  }

  template <typename A>
  std::string to_string(const std::vector<A> &vec)
  {
    bool first = true;
    std::string res = "{";
    for (const auto &x : vec)
    {
      if (!first)
        res += ", ";
      first = false;
      res += to_string(x);
    }
    res += "}";
    return res;
  }
  
  template <typename A, typename B>
  std::string to_string(std::pair<A, B> p)
  {  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";  }
  
  template <typename A, typename B, typename C>
  std::string to_string(std::tuple<A, B, C> p)
  {  return "(" + to_string(std::get<0>(p)) + ", " + to_string(std::get<1>(p)) + ", " + to_string(std::get<2>(p)) + ")";  }
  
  template <typename A, typename B, typename C, typename D>
  std::string to_string(std::tuple<A, B, C, D> p)
  {  return "(" + to_string(std::get<0>(p)) + ", " + to_string(std::get<1>(p)) + ", " + to_string(std::get<2>(p)) + ", " + to_string(std::get<3>(p)) + ")";  }
  
  void debug_out() {  std::cerr << std::endl;  }
  
  template <typename Head, typename... Tail>
  void debug_out(Head H, Tail... T)
  {
    std::cerr << " " << to_string(H);
    debug_out(T...);
  }
  
  #ifndef ONLINE_JUDGE
  #define debug(...) std::cerr << "\033[33m[" << #__VA_ARGS__ << "]\033[0m:", debug::debug_out(__VA_ARGS__)
  #else
  #define debug(...) 42
  #endif

}  // namespace debug


typedef int32_t Test;

int main()
{
  fastio::use_iostream();

  Test tt;
  std::cin >> tt;

  int32_t nn, idx, cnt_ones, kk;
  std::string ss, aa, bb;

  do {
    
    std::cin >> nn >> ss;
    if (ss[0] == '0' or ss[nn - 1] == '0')
    {
      std::cout << "NO\n";
      continue;
    }
    cnt_ones = 0;
    for (idx = 0; idx < nn; ++idx)
      if (ss[idx] == '1')
        ++cnt_ones;
    
    if (cnt_ones % 2 != 0)
    {
      std::cout << "NO\n";
      continue;
    }
    aa = bb = ss;
    bool flip = false;  // No matter which is closed first?
    kk = 0;
    for(idx = 0; idx < nn; ++idx)
    {
      if(ss[idx] == '1')
      {
        aa[idx] = bb[idx] = (2 * kk < cnt_ones ? '(' : ')');
        ++kk;
      }
      else
      {
        aa[idx] = (flip ? '(' : ')');
        bb[idx] = (flip ? ')' : '(');
        flip = !flip;
      }
    }
    std::cout << "YES\n" << aa << '\n' << bb << '\n';

  } while (--tt);
  return 0;
}