#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (s[0] == '?') s[0] = '(';
  if (s[n - 1] == '?') s[n - 1] = ')';
  int fp = 0, bp = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      fp++;
    else if (s[i] == ')')
      bp++;
  }
  int tm = min(fp, bp);
  fp = fp - tm;
  bp = bp - tm;
  int tbd = 0;
  for (int i = 0; i < n && bp != 0; i++) {
    if (s[i] == '?') {
      s[i] = '(';
      bp--;
    }
  }
  for (int i = n - 1; i >= 0 && fp != 0; i--) {
    if (s[i] == '?') {
      s[i] = ')';
      fp--;
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') tbd++;
  }
  if (tbd % 2 != 0) {
    cout << ":(" << endl;
    return 0;
  }
  tbd = tbd / 2;
  int p = 0;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == '(')
      p++;
    else if (s[i] == ')')
      p--;
    else {
      if (tbd > 0) {
        s[i] = '(';
        tbd--;
        p++;
      } else {
        s[i] = ')';
        p--;
      }
    }
    if (p <= 0) {
      cout << ":(" << endl;
      return 0;
    }
  }
  if (p == 1 && s[n - 1] == ')') {
    cout << s << endl;
  } else {
    cout << ":(" << endl;
  }
  return 0;
}
