#include<bits/stdc++.h>
using namespace std;

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

signed main(){
    int N;cin>>N;
    vint P(N);rep(i,N)cin>>P[i];

    int num=0;
    string ans;
    stack<int>s;

    rep(i,N){
        while(num<P[i]){
            num++;s.push(num);ans+="(";
        }
        if(s.empty()||s.top()!=P[i]){
            cout<<":("<<endl;
            return 0;
        }
        ans+=")";s.pop();
    }
    cout<<ans<<endl;
    return 0;
}

