#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <math.h>
#define ll long long
#define endl "\n"
#define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

using namespace std;

int main()
{
    //ios;
    ll q, n, k, t, op, cl;
    bool prev = false;
    bool stigo = false;
    cin >> q;

    while (q--)
    {
        cin >> n >> k >> t;
        prev = stigo = false;

        op = n / 2;
        cl = n /2;

        if (n / 2 < t || (k == 0 && n % 2 != 0))
        {
            cout << "Ne postoji" << endl;
            continue;
        }

        for (ll i = 0; i < n; i++)
        {
            if (op == t - 1)
                stigo = true;

            if (op == 0)
            {
                cout << ")";
                --cl;
            }

            else if (!stigo && op > 0)
            {
                cout << "(";
                prev = true;
                --op;
            }

            else if (cl > 0 && stigo && prev)
            {
                cout << ")";
                prev = false;
                --cl;
            }

            else if (op > 0 && stigo && !prev)
            {
                cout << "(";
                prev = true;
                --op;
            }
        }

        cout << endl;
    }


    return 0;
}