#include<iostream>
#include <cmath>

using namespace std;

int main(){
	int q,n,k,c;
	long long int t,x,y,m;
	
	cin>>q;
	
	for(int i=1;i<=q;i++){
		cin>>n>>k>>t;
		x=0;
		c=0;
		if(n==k)c=1;
		m=pow(2,n)-pow(2,(n-k)/2)+c;
		if(t>m)cout<<"Ne postoji";else{
		
		for(int l=1;l<=(n-k)/2;l++ )x=x+pow(2,(l-1));
		
		if(k==0)t=(t-1)*n+1;
		
		x=x+t-1;
		
		for (int j = n-1; j >= 0; j--) { 
        	 y = x >> j; 
        if (y & 1) 
            cout << ")"; 
        else
            cout << "("; 
    } 
	}
	}
}