#include<bits/stdc++.h>
#define F first
#define S second
#define int long long
#define double long double
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> iP;
typedef pair<P,int> Pi;
typedef pair<P,P> PP;
double eps=1e-8;
int mod=1e9+7;
int inf=1LL<<55;

priority_queue<P,vector<P>,greater<P> > pq;

int n,p[100000];


string ans;

signed main(){
  cin>>n;
  for(int i=0;i<n;i++)cin>>p[i];

  stack<int> st;
  int x=1;
  string ans;
  for(int i=0;i<n;i++){
    while(x<=p[i])st.push(x++),ans+='(';
    int y=st.top();
    if(y!=p[i]){cout<<":("<<endl;return 0;}
    ans+=')';
    st.pop();
  }
  cout<<ans<<endl;
  
  return 0;
}

