Example

Input

1


Output

)(
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define D double
#define pb push_back
#define mp make_pair
#define sf scanf
#define pf printf
#define ff first
#define ss second
#define SZ 100005
#define eps 1e-8
#define PI (2*acos(0.0))
#define mem(a, b) memset(a, b, sizeof a)
#define FastIO ios_base::sync_with_stdio(0)
const int inf = 0x7f7f7f7f;
int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
//int dx[]={2,1,-1,-2,-2,-1,1,2};
//int dy[]={1,2,2,1,-1,-2,-2,-1};
//int mnth[]={-1,31,28,31,30,31,30,31,31,30,31,30,31};
int main()
{
    //FastIO;
    int n;
    while(sf("%d", &n)==1)
    {
        int sum = 0, i;
        for(i=1; ; i++) {
            sum += i;
            if(sum>=n) break;
        }

        int a = ((i-1)*i)/2;
        int b = n - a;

        //cout<<i<<endl;
        //cout<<b<<endl;

        int open = 0, close = 0;
        string s;
        for(int j=1; j<=b; j++) {
            s += ")"; close++;
        }

        if(open<i && close<i) {
            s += "()"; open++; close++;
        }

        for(int j=close+1; j<=i; j++) s += ")";
        for(int j=open+1; j<=i; j++) s += "(";

        cout<<s<<endl;
    }
    return 0;
}