Example

Input

1


Output

)(
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cassert>

using namespace std;

using lint = long long;
using ldouble = long double;

string rec(int A, int L) {
    if (L <= 0) {
        assert(A == 0);
        return "";
    }

    int D;
    for (D = 0; D * (D + 1) / 2 < A; ++D) {}

    string ret;
    for (int i = 0; i < L - D; ++i) ret += "()";
    return ret + ')' + rec(A - D, D - 1) + '(';
}

int main() {
    int A;
    cin >> A;
    int D;
    for (D = 1; D * (D + 1) / 2 < A; ++D) {}
    cout << ')' + rec(A - D, D - 1) + '(' << endl;
    return 0;
}

