#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    string str;
    cin >> str;
    int lcnt = 0, rcnt = 0, qcnt = 0;
    for (int i = str.length() - 1; i >= 0; i--) {
      if (str[i] == '(')
        lcnt++;
      else if (str[i] == ')')
        rcnt++;
      else
        qcnt++;
    }
    int val = lcnt - rcnt;
    if ((qcnt + lcnt - rcnt) % 2 == 1) {
      cout << ":(";
      return 0;
    }
    int rr = (qcnt + lcnt - rcnt) / 2;
    int ll = qcnt - rr;
    lcnt = 0, rcnt = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str[i] == '(')
        lcnt++;
      else if (str[i] == ')')
        rcnt++;
      if (ll > 0 && str[i] == '?') {
        ll--;
        lcnt++;
        str[i] = '(';
      }
      if (rr > 0 && str[i] == '?') {
        rr--;
        rcnt++;
        str[i] = ')';
      }
      if (lcnt <= rcnt && i != str.length() - 1) {
        cout << ":(";
        return 0;
      }
    }
    if (lcnt != rcnt) {
      cout << ":(";
      return 0;
    }
    cout << str << endl;
  }
  return 0;
}
