#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pi pair<int,int>
#define f first
#define s second
void find(int N,vector<int>& a)
{
    int n=(N<<1);
    vector<bool> vis(n,1);
    vector<pi> val(n);
    for(int i=0;i<n;i++)
    val[i]=make_pair(a[i],i);
    sort(val.begin(),val.end());
    for(int i=0;i<N;i++)
    vis[val[i].s]=0;
    int cur=0;
    string res="";
    bool f=0;
    for(int i=0;i<n;i++)
    {
        if(cur==0 or vis[i]==f)
        {
            res.push_back('(');
            f=vis[i];
            ++cur;
        }
        else
        {
            res.push_back(')');
            --cur;
        }
    }
    cout<<res;
}
int32_t main()
{
    int n;
    cin>>n;
    vector<int> a(2*n);
    for(int i=0;i<2*n;i++)
    cin>>a[i];
    find(n,a);
    return 0;
}

#include<set>
#include<queue>
#include<cmath>
#include<vector>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define MAXN 10005
#define ENDL putchar('\n')
#define LL long long
#define DB double
#define lowbit(x) ((-x) & (x))
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 b[MAXN];
int main() {
	n = read();
	int ct = 0;
	for(int i = 1;i <= 10000;i ++) {
		if(i != 6 && i != 10 && i != 15) {
			int w = 0;
			if(i % 2 == 0) w ++;
			if(i % 3 == 0) w ++;
			if(i % 5 == 0) w ++;
			if(w > 1) b[++ ct] = i;
		}
	}
	for(int i = 1;i <= n-3;i ++) {
		printf("%d ",b[i]);
	}
	printf("6 10 15\n");
	return 0;
}