#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  int n;
  cin >> n;
  vector<int> in(n);
  for (int i = 0; i < n; i++) {
    cin >> in[i];
  }
  string res;
  int open = 0;
  for (int i = 0; i < n; i++) {
    while (open < in[i]) {
      res += '(';
      open++;
    }
    res += ')';
  }
  stack<int> st;
  open = 0;
  int close = 0;
  for (int i = 0; i < n + n; i++) {
    if (res[i] == '(') st.push(++open);
    else {
      if (st.top() != in[close++]) {
        cout << ":(" << endl;
        return 0;
      }
      st.pop();
    }
  }
  cout << res << endl;
  return 0;	
}
