Example

Input

1


Output

)(
#include<bits/stdc++.h>
using namespace std;
#define  mx 10000000
#define m 44722

int ar[m+5],num;


int main()
{
    int val = 0,in=0;
    for(int i=1;i<mx;i++){

        //if(in>44715) cout<<val<<" "<<in<<endl;
        val+=i;
        if(in==44721+1) break;
        ar[++in] = val;

    }
    //cout<<in<<" "<<ar[in];
    scanf("%d",&num);
    //num=1000000000;

    if(num==1){
        cout<<")("<<endl;
        return 0;
    }
    else if(num==2){
        cout<<")()("<<endl;
        return 0;
    }
    else if(num==3){
        cout<<"))(("<<endl;
        return 0;
    }

    int idx;
    for(int i=1;i<=m;i++){
        if(num<=ar[i]){
            idx = i;
            break;
        }
    }
    //cout<<idx*2+5<<endl;
    int n = ar[idx];

    char x[idx*2+5];

    for(int i=1;i<=idx*2;i++){
        if(i<=idx) x[i] = ')';
        else x[i] = '(';
        //printf("%c",x[i]);
    }

    if(num==n){
        for(int i=1;i<=idx*2;i++) printf("%c",x[i]);
        cout<<endl;
    }
    else{
        int h=idx+1;
        for(int i=n-1;i>1;i--){

            swap(x[h],x[h-1]);
            if(num==i){
                for(int i=1;i<=idx*2;i++) printf("%c",x[i]);
                cout<<endl;
                break;
            }
            h--;
        }
    }

    return 0;
}