#include <iostream>
#include <string>

#define MAXN 1001

using namespace std;

void njedk(int n,int t)
{
    int p=0,d=1;
    while(d<t)
    {
        p++;
        d*=2;
    }
    if(n<p)
        cout<<"Ne postoji"<<endl;
    else
    {
        string s(n,'(');
        int i=n-1;
        t--;
        while(t>0)
        {
            if(t%2==1)
                s[i]=')';
            t/=2;
            i--;
        }
        cout<<s<<endl;
    }
}

void glavna()
{
    int n,k,t;
    cin>>n>>k>>t;
    if(n==k)
        njedk(n,t);
    else
        cout<<"Ne postoji"<<endl;
}

int main()
{
    int q;
    cin>>q;
    while(q--)
        glavna();

    return 0;
}