#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

string DrugiSlucaj(ll n, ll k)
{
    vector<vector<ll>> d(2*n+1, vector<ll>(n+1, 0));
    d[0][0] = 1;
    for (ll i = 1; i <= 2*n; i++) {
        d[i][0] = d[i-1][1];
        for (ll j = 1; j < n; j++)
            d[i][j] = d[i-1][j-1] + d[i-1][j+1];
        d[i][n] = d[i-1][n-1];
    }

    string ans;
    ll depth = 0;
    for (ll i = 0; i < 2*n; i++) {
        if (depth + 1 <= n && d[2*n-i-1][depth+1] >= k) {
            ans += '(';
            depth++;
        } else {
            ans += ')';
            if (depth + 1 <= n)
                k -= d[2*n-i-1][depth+1];
            depth--;
        }
    }
    return ans;
}

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

    ll q;
    cin >> q;

    while(q--)
    {
        ll n,k,t;
        cin>> n >> k >> t;

        if(k >= n)
        {
            ll bin[32];
            ll i = 0;
            while (n > 0)
            {
                bin[i] = n % 2;
                i++;
                n/=2;
            }
            if(i>t) cout<<"Ne postoji\n";
            i--;

            for (ll t = i; t >= 0; t--)
            {
                bin[t]==0 ? cout << '(' : cout << ')';
            }
            cout<<"\n";
        }
        else if(k == 0)
        {
            (n%2==1) ? cout<<"Ne postoji"<<"\n" : cout<< DrugiSlucaj(n/2,t)<<"\n";
        }
    }
}