#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 998244353
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)

typedef long long ll;
typedef pair<ll,ll> P;

int main(){

	int n;cin >> n;
	vector<P> v(n);
	REP(i, n){
		cin >> v[i].FI;
		v[i].SE = i + 1;
	}

	sort(ALL(v),greater<P>());

	int now = n;
	stack<int> st;
	vector<char> ans;

	REP(i, n){
	//cout << "v " << v[i].FI << " " << v[i].SE << endl;
		while(now > 0 && now >= v[i].SE){
			ans.PB(')');
			st.push(now);
			now--;
		}
	//	cout << " " << now << " " << st.top() << endl;
		if(st.empty() || st.top() != v[i].SE){
			cout << ":(" << endl;
			return 0;
		}

		ans.PB('(');
		st.pop();
	}

	REP(i,ans.size())cout << ans[ans.size() - i - 1];
	cout << endl;


	return 0;
}

