#include<bits/stdc++.h>

using namespace std;
#define INF (1<<28)
#define DEKAI 1000000007
#define lp(i,n) for(int i=0;i<n;i++)
#define int long long

int x[100001];

signed main(){
  int n;
  cin>>n;
  int a[100001];
  int check=0,mini;
  lp(i,n){
    cin>>a[i];
    if(i==0) mini=a[i];
    if(a[i]<mini&&a[i]!=mini-1){
      cout<<":("<<endl;
      return 0;
    }
    mini=min(mini,a[i]);
  }
  int bef=0;
  string s="";
  lp(i,n){
    if(i==0||bef<a[i]){
     lp(j,a[i]-bef){
        s.push_back('(');
      }
      bef=max(a[i],bef);
    }
    s.push_back(')');
  }
  string ans=s;
  //cout<<s<<endl;
  int stat=0;
  while(1){
    stat=0;
    lp(i,s.size()){
      if(i==0)continue;
      if(s[i]==')'&&s[i-1]=='('){
        s.erase(i-1,2);
        stat=1;
      }
    }
    if(stat==0)break;
    //cout<<s<<endl;
  }
  if(s.size()==0){
    cout<<ans<<endl;
  }
  else{
    cout<<":("<<endl;
  }
  return 0;
}
