#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#endif
#if __has_include(<atcoder/all>)
#include <atcoder/all>
#endif
#include <bits/stdc++.h>
using namespace std;
#define int long long
using ll = long long;
using ld = long double;
using P = pair<int, int>;
#define rep(i, a, b) for(int i = (int)(a); i <= (int)(b); i++)
#define rrep(i, a, b) for(int i = (int)(a); i >= (int)(b); i--)
const int MOD = 1000000007;
const int MOD2 = 998244353;
const ll INF = 1e18;
const ld PI = acos(-1);

signed main() {
    int N;
    cin >> N;
    //小さい N こと大きい N 個を組み合わせて作る
    vector<int> A(2*N);
    vector<P> B(2*N);
    rep(i,0,2*N-1){
        cin >> A[i];
        B[i].first=A[i];
        B[i].second=i;
    }
    sort(B.begin(),B.end());
    vector<int> small(2*N,0);
    rep(i,0,N-1){
        small[B[i].second]=1;
    }
    stack<int> smalls,larges;
    vector<char> ans(2*N);
    rep(i,0,2*N-1){
        if(small[i]==1){
            smalls.push(i);
        }
        else{
            larges.push(i);
        }
        if(smalls.size()&&larges.size()){
            int F=smalls.top();smalls.pop();
            int G=larges.top();larges.pop();
            ans[min(F,G)]='(';
            ans[max(F,G)]=')';
        }
    }
    rep(i,0,2*N-1){
        cout << ans[i];
    }
    cout << endl;
}
#include<algorithm>
#include<cstdio>
#define ll long long
#define MaxN 400500
using namespace std;
int n;
ll a[MaxN],x[MaxN];
int main()
{
  scanf("%d",&n);
  for (int i=1;i<=n+n;i++){
    scanf("%lld",&a[i]);
    x[i]=a[i]=a[i]*n+i;
  }
  sort(x+1,x+n+n+1);
  for (int i=1,cnt;i<=n+n;i++){
    if (a[i]<=x[n]){
      putchar(cnt<0 ? ')' : '(');
      cnt++;
    }else {
      putchar(cnt>0 ? ')' : '(');
      cnt--;
    }
  }return 0;
}