#include <bits/stdc++.h>
#define ll long long

using namespace std;

int n,k,t;

string solve()
{
    if(k>n || (n-k)%2!=0)
        return ("Ne postoji");

    if(k==n)
    {
        t--;
        string ret="";
        if(t>=(1<<n))
            return ("Ne postoji");
        while(n--)
        {
            if(t%2==0) ret="("+ret;
            else ret=")"+ret;
            t/=2;
        }
        return ret;
    }
    return ("Ne postoji");
}

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

	int q;
	cin>>q;
	while(q--)
    {
        cin>>n>>k>>t;
        cout<<solve()<<endl;
    }

	return 0;
}