#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<string> a(n);
    a[0] = "(";
    for(int i = 1; i < n; i++){
        a[i] += string(i, ')');
        if(i + 1 != n)a[i] += string(i + 1, '(');
    }
    for(int i = 0; i < n; i++){
        cout << a[i] << '\n';
    }
}