#include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_set>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<complex>
#include<tuple>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pi;
typedef pair<double,double> pd;
typedef pair<double,ll> pdl;
#define F first
#define S second
const ll E=1e18+7;
const ll MOD=1000000007;




int main(){
    ll n;
    cin>>n;
    vector<ll> a(n);
    for(auto &I:a){cin>>I;}
    string s;
    ll w=0;
    stack<ll> S;
    for(int i=0;i<n;i++){
        while(w<a[i]){w++; s.push_back('('); S.push(w);}
        if(S.empty() || S.top()!=a[i]){cout<<":("<<endl; return 0;}
        s.push_back(')');
        S.pop();
    }
    if(!S.empty()){cout<<":("<<endl; return 0;}
    cout<<s<<endl;
    
    
    
    
    
    return 0;
}

