#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#define int long long
#define mod 1000000007
#define for0(i, n) for(int i = 0; i < (n); i++)
#define for1(i, n) for(int i = 1; i <= (n);i++)
using namespace std;
bool b00l[123123];
signed main() {
	int n; string ans = "";
	int a = 0, b = 0, c;
	cin >> n;
	for1(i, n) {
		cin >> c;
		if (a < c) {
			for1(j, c - a)ans += '(';
			ans += ')';
			a = c;
		}
		else {
			bool b1 = 1;
			for (int j = c + 1; j <= a; j++)if (!b00l[j])b1 = 0;
			if (b1) { ans += ')'; }
			else {
				cout << ":(\n";
				return 0;
			}
		}
		b = c;
		b00l[c] = 1;
	}
	cout << ans << endl;
}
