#include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <list>
#include <iterator>
#pragma warning(disable:4996)
 
typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF 9223300000000000000
#define INF 2140000000
#define MOD 1000000007
using namespace std;

vector<long> ans;

bool solve( long n, const long* a, long offset )
{
    if(n<1) return true;

    long aa = a[0] - offset;
    if(aa<1 || aa>n) return false;

    ans.push_back(1);
    if (!solve( aa-1, &(a[1]), offset )) {
        return false;
    }
    ans.push_back(0);

    solve( n-aa, &(a[aa]), offset+aa );

    return true;
}

int main(int argc, char* argv[])
{
    long n;
    scanf("%ld", &n);

    vector<long> a(n);
    long i;
    for(i=0; i<n; i++) {
        long tmp;
        scanf("%ld", &tmp);
        a[tmp-1] = i+1;
    }

    if( solve( n, &(a[0]), 0 ) ) {    
        for(i=0; i<(long)ans.size(); i++) {
            if(ans[i]) printf("(");
            else       printf(")");
        }
        printf("\n");
    }
    else {
        printf(":(\n");
    }

    return 0;
}


