#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<set>
#include<map>
#include<iostream>

#define fi first
#define se second
#define mk make_pair
#define pb push_back

#define ls (t<<1)
#define rs ((t<<1)|1)
#define mid ((l+r)>>1)

#define N 500005

using namespace std;

int n, a[N], id[N], vis[N], Count[N];

int cmp(int x, int y)
{
	return a[x] > a[y]; 
}

int main()
{
	scanf("%d", &n); n <<= 1; 
	for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), id[i] = i;
	sort(id + 1, id + n + 1, cmp);
	for (int i = 1; i <= n / 2; ++i) vis[id[i]] = 1;
	for (int i = 1; i <= n; ++i)
	{
		if (!Count[vis[i] ^ 1]) printf("("), Count[vis[i]] ++; 
		else Count[vis[i] ^ 1] --, printf(")");
	}
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define Pr pair<ll,ll>
#define Tp tuple<int,int,int>
using Graph = vector<vector<Tp>>;

ll mod = 998244353;

int main() {
    ll N; cin >> N;
    vector<Pr> seq;
    rep(i,2*N){
        ll a; cin >> a;
        seq.push_back(make_pair(a,i));
    }
    sort(seq.begin(),seq.end());
    int small[2*N];
    rep(i,2*N) small[i] = 0;
    rep(i,N){
        int k = seq[i].second; small[k] = 1;
    }
    ll cnt[2];
    rep(i,2) cnt[i] = 0;
    rep(i,2*N){
        if(cnt[small[i]]<cnt[(small[i]^1)]) cout << ")";
        else cout << "(";
        cnt[small[i]]++;
    }
    cout << endl;
    //cout << ans << endl;
}