#include <bits/stdc++.h>
const double esp = 1e-6;
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
const int inf = 1e9;
using namespace std;
char s[300005];
int n;
void unhy() {
  cout << ":(" << endl;
  return;
}
int main() {
  cin >> n;
  int lf = 0, rt = 0;
  int qu = 0;
  if (n & 1) {
    unhy();
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] == '(')
      lf++;
    else if (s[i] == ')')
      rt++;
  }
  if (lf > n / 2 || rt > n / 2) {
    unhy();
    return 0;
  }
  int tlf = n / 2 - lf;
  int trt = n / 2 - rt;
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      s[i] = '(';
      tlf--;
    }
    if (tlf == 0) break;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') s[i] = ')';
  }
  bool flag = false;
  int temp = 0;
  int st = 0;
  for (int i = 0; i < n; i++) {
    if (st == 0) {
      if (s[i] == '(')
        temp++;
      else
        temp--;
      st++;
    } else {
      if (temp <= 0) {
        flag = true;
        break;
      }
      if (s[i] == '(')
        temp++;
      else
        temp--;
    }
  }
  if (temp != 0 || flag)
    unhy();
  else {
    cout << s << endl;
  }
  return 0;
}
