#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vl1;
typedef vector<vl1> vl2;

void stampa(vl2& mata, ll n, ll m)
{for(int i=0;i<=n;i++)
  { cout<<endl;
    for(int k=0;k<=m;k++) cout<<mata[i][k]<<' ';
  }
}

int main()
{ ios_base::sync_with_stdio(false);
  cin.tie(0);

  ll i, k, kn, m, mq, n, t, q, x, y, val, tmp;
  ll gore, dole, poc, kraj, pola, suma, pol, kof;
  cin>>q;
  for(mq=1;mq<=q;mq++)
  { cin>>n>>kn>>t;
    if((n-kn)&1==1)
      {if(kn==0)
        { cout<<"Ne postoji\n";
          continue;
        }
       else kn--;//prvo ovo
      }
    if(kn==0)//nema oduzimanja
     {if(n&1==1)
        { cout<<"Ne postoji\n";
          continue;
        }
       else
       { pola=n/2;
         gore=pola;
         dole=0;
         m=gore;
         vl2 mata(n+1,vl1(m+1));
         mata[0][dole]=1;
         for(i=1;i<=pola;i++)//siri
          { for(y=i;y>=0;y-=2)
             {if(y>0)mata[i][y]=mata[i-1][y-1];
              if(y<m) mata[i][y]+=mata[i-1][y+1];
             }
          }
         for(i=pola+1;i<=n;i++)//siri
         { for(y=n-i;y>=0;y-=2)
            {if(y>0)mata[i][y]=mata[i-1][y-1];
             if(y<m) mata[i][y]+=mata[i-1][y+1];
            }
         }
         //stampa(mata, n, m);
         //provera da li moze
         suma=mata[n][0];
         if(suma<t)
           { cout<<"Ne postoji\n";
             mata.clear();
             continue;
           }
          //idemo unazad
         vl1 niz(n+1);
         niz[0]=dole;
         pol=dole; suma=0; tmp=0;
         for(i=n;i>0;i--)
          { while(tmp<t)
             { tmp+=mata[i][pol]; pol-=2;}
            pol+=2;
            tmp-=mata[i][pol];
            niz[i]=pol;
            //cout<<endl<<"i = "<<i<<" pol = "<<pol<<" tmp = "<<tmp;
            //getchar();
            if(mata[i-1][pol+1]>0) pol++; else pol--;
          }
         for(i=1;i<=n;i++) if(niz[i]>niz[i-1])cout<<'('; else cout<<')';
         cout<<endl;
         mata.clear();
         niz.clear();
       }
     }
    else if(n==kn)
     { vl1 niz(n+1);
       val=t-1;
       for(i=n;i>0;i--)
        { niz[i]=val&1;
          val>>=1;
        }
       if(val>0) cout<<"Ne postoji\n";
       else
       { for(i=1;i<=n;i++) if(niz[i]==0) cout<<'('; else cout<<')';
         cout<<endl;
       }
     }
    else//kn>0
    { pola=(n-kn)/2;
      gore=kn+pola;
      dole=kn;
      m=gore+dole;
      vl2 mata(n+1,vl1(m+1));
      mata[0][dole]=1;
      for(i=1;i<=kn;i++)//siri
       { for(k=-i;k<=i;k+=2)
           { y=dole+k;
             if(y>0)mata[i][y]=mata[i-1][y-1];
            if(y<m) mata[i][y]+=mata[i-1][y+1];
          }
       }
      poc=0; kraj=dole+kn;
      for(i=kn+1;i<=kn+pola;i++)//gore
        { poc++; kraj++;
          for(y=poc;y<=kraj;y+=2)
           { mata[i][y]=mata[i-1][y-1];
             if(y<kraj) mata[i][y]+=mata[i-1][y+1];
           }
        }
      for(i=kn+pola+1;i<=n;i++)//dole
        { poc--; kraj--;
          for(y=poc;y<=kraj;y+=2)
           { if(y>poc)mata[i][y]=mata[i-1][y-1];
             mata[i][y]+=mata[i-1][y+1];
           }
        }
      //stampa(mata, n, m);
      //provera da li moze
      suma=0;
      for(k=dole+kn;k>=0;k-=2) suma+=mata[n][k];
      //cout<<endl<<"Ima nacina = "<<suma;
      if(suma<t)
        { cout<<"Ne postoji\n";
          mata.clear();
          continue;
        }
      //idemo unazad
     vl2 put(n+1, vl1(m+1));
     for(k=0;k<=m; k++)put[n][k]=mata[n][k];//prepis zadnjeg reda
     for(i=n;i>0;i--)
      { put[i-1][1]=put[i][0];//samo prepis, moze dod
        for(k=1;k<m;k++)
         {if(put[i][k]>0)
           {  kof=put[i][k]/(mata[i-1][k-1]+mata[i-1][k+1]);
              put[i-1][k-1]+=mata[i-1][k-1]*kof;
              put[i-1][k+1]+=mata[i-1][k+1]*kof;
           }
         }
        put[i-1][m-1]+=put[i][m];
      }
      //cout<<endl;
     //stampa(put, n, m);

     //pravi put od napred
     vl1 niz(n+1);
     niz[0]=dole;
     for(i=1;i<=n;i++)
     { pol=niz[i-1]-1;
       if(pol<0||put[i][pol]==0){ pol+=2; niz[i]=pol;}
       else
       { suma=0; k=pol;
         while(put[i][k]>0&&k<=m) { suma+=put[i][k]; k+=2;}
         if((suma-put[i][pol])>=t) pol+=2;//ako je dovoljan gornji put
         niz[i]=pol;
       }
     }
     for(i=1;i<=n;i++) if(niz[i]>niz[i-1])cout<<'('; else cout<<')';
     cout<<endl;
     mata.clear();
    }//kn>0
 }//mq
  //cout << "Hello world!" << endl;
  return 0;
}
/*
1
6 2 1

6
6 2 1
6 2 2
6 2 3
6 2 4
6 2 5
6 2 6

6
1 1 1
1 1 2
1 1 3
3 1 1
4 4 9
8 0 2
*/