#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
int n,f[N],c,sz;
pair<int,int>a[N];
int main(){
	cin>>n;n*=2;
	for(int i=1;i<=n;i++)scanf("%d",&a[i].first),a[i].second=i;
	sort(a+1,a+1+n);
	for(int i=1;i<=n/2;i++)f[a[i].second]=1;
	for(int i=1;i<=n;i++){
		if(!sz||c==f[i]){c=f[i];sz++;putchar('(');}
		else{sz--;putchar(')');}
	}
	return 0;
}
#include<set>
#include<queue>
#include<cmath>
#include<vector>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define MAXN 400005
#define ENDL putchar('\n')
#define LL long long
#define DB double
#define lowbit(x) ((-x) & (x))
#define INF 0x3f3f3f3f
LL read() {
	LL f = 1,x = 0;char s = getchar();
	while(s < '0' || s > '9') {if(s=='-')f = -f;s = getchar();}
	while(s >= '0' && s <= '9') {x=x*10+(s-'0');s = getchar();}
	return f * x;
}
int n,m,i,j,s,o,k;
int a[MAXN];
struct it{
	int nm,id;
}b[MAXN];
bool cmp(it a,it b) {return a.nm == b.nm ? (a.id < b.id):(a.nm < b.nm);}
int main() {
	n = read();
	for(int i = 1;i <= 2*n;i ++) {
		a[i] = read();b[i].nm = a[i];b[i].id = i;
	}
	sort(b + 1,b + 1 + 2*n,cmp);
	for(int i = 1;i <= n;i ++) {
		a[b[i].id] *= -1;
	}
	int ct = 0;
	for(int i = 1;i <= 2*n;i ++) {
		if(a[i] < 0) {
			if(ct < 0) putchar(')');
			else putchar('(');
			ct ++;
		}
		else {
			if(ct > 0) putchar(')');
			else putchar('(');
			ct --;
		}
	}ENDL;
	return 0;
}