#include <bits/stdc++.h>
#define file(x) freopen(#x".in", "r", stdin), freopen(#x".out", "w", stdout)

inline int read()
{
	int data = 0, w = 1; char ch = getchar();
	while (ch != '-' && !std::isdigit(ch)) ch = std::getchar();
	if (ch == '-') w = -1, ch = std::getchar();
	while (std::isdigit(ch)) data = data * 10 + (ch ^ 48), ch = std::getchar();
	return data * w;
}

const int N(4e5 + 10);
int n, a[N], id[N], b[N], stk[N], top;

int main()
{
#ifndef ONLINE_JUDGE
	file(cpp);
#endif
	n = read();
	for (int i = 1; i <= (n << 1); i++) a[i] = read();
	for (int i = 1; i <= (n << 1); i++) id[i] = i;
	std::sort(id + 1, id + (n << 1 | 1), [] (int x, int y) { return a[x] < a[y]; });
	for (int i = 1; i <= n; i++) b[id[i]] = 1;
	for (int i = 1; i <= (n << 1); i++)
		if (top && b[i] != stk[top]) putchar(')'), --top;
		else stk[++top] = b[i], putchar('(');
	return 0;
}

#include <bits/stdc++.h>
#define ll long long

using namespace std;

const int MAXN=400005;
const ll mod=998244353;

ll n,tag[MAXN];
pair<ll,ll> p[MAXN];

int main(){
	scanf("%lld",&n);
	for(ll i=1;i<=2*n;i++){
		scanf("%lld",&p[i].first);
		p[i].second=i;
	}
	sort(p+1,p+2*n+1);
	for(ll i=n+1;i<=2*n;i++){
		tag[p[i].second]=1;
	}
	ll cntl=0,cntr=0;
	for(ll i=1;i<=2*n;i++){
		if(tag[i]==0){
			if(cntl==0&&cntr==0){
				cntl++;
				printf("(");
			}
			else if(cntl>0&&cntr==0){
				cntl++;
				printf("(");
			}
			else if(cntl==0&&cntr>0){
				cntr--;
				printf(")");
			}
		}
		else if(tag[i]==1){
			if(cntl==0&&cntr==0){
				cntr++;
				printf("(");
			}
			else if(cntl>0&&cntr==0){
				cntl--;
				printf(")");
			}
			else if(cntl==0&&cntr>0){
				cntr++;
				printf("(");
			}
		}
	}

	return 0;
}
