#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF=1e9,MOD=1e9+7;
const ll LINF=1e18;
using namespace std;
#define int long long
//template
//main
signed main(){
  int N;cin>>N;
  std::vector<int> v(N);
  for(int i=0;i<N;i++)cin>>v[i];
  string ans;
  stack<int> sta;
  int a=1;
  for(int i=0;i<N;i++){
    while(v[i]>=a){sta.push(a++);ans+='(';}
    int k=sta.top();sta.pop();
    if(k!=v[i]){cout<<":("<<endl;return 0;}
    ans+=')';
  }
  cout<<ans<<endl;
}

