#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<(n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s,f,t) ((s).substr((f)-1,(t)-(f)+1))
#define ALL(a) (a).begin(),(a).end()
using namespace std;
struct Grid{ll x,y,t;};
struct Edge{ll to,cost;};
struct Graph{vector<vector<Edge>>E;int V;
  const ll Inf = llINF;const int MAX_V=201010;vector<ll>d;
  Graph(int n):E(n){d.resize(MAX_V);E.resize(n);V=n;}
  void init(){for(int i=0;i<MAX_V;i++)d[i]=Inf;}
  void add_edge(ll from,ll to,ll cost){E[from].pb({to,cost});}
};
bool used[111111];
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;cin>>n;
  string ans="";
  bool hog=true;
  vi A(n);
  ll mi=1;
  ll ma=0;
  for(int i=0;i<n;i++){
    cin>>A[i];
    ma=max(A[i],ma);
    used[A[i]]=true;
    if(A[i]==mi){
      for(int j=mi;j<=ma;j++)
	if(used[j]==false)hog = false;
      if(hog){
	string s="";
	for(int j=0;j<(ma-mi+1)*2;j++)s+='(';
	ll po=0;
	ll cnt=0;
	for(int j=mi-1;j<ma;j++){
	  for(int k=po;k<s.size();k++){
	    if(cnt<=A[j]-mi){
	      cnt++;
	    }else{
	      s[k]=')';
	      po=k+1;
	      break;
	    }
	  }
	}
	mi=ma+1;
	ma=0;
	ans+=s;
      }
    }
  }
  if(hog){
    cout<<ans<<endl;
  }else{
    cout<<":("<<endl;
  }
  return 0;
}

