#include <bits/stdc++.h>
using namespace std;
bool check(const string &s) {
  int bal = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(') {
      bal++;
    } else {
      bal--;
    }
    if (bal < 0) return false;
  }
  return bal == 0;
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  n = s.size();
  if (s.size() % 2 == 1) {
    cout << ":(";
    return 0;
  }
  if (s[0] == ')' || s[1] == ')' || s[(int)s.size() - 1] == '(' ||
      s[(int)s.size() - 2] == '(') {
    cout << ":(";
    return 0;
  }
  s[0] = '(';
  s.back() = ')';
  s[1] = '(';
  s[(int(s.size() - 2))] = ')';
  int c1 = 0, c2;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      c1++;
    }
  }
  c1 = n / 2 - c1;
  string ans = s;
  ans[0] = '(';
  ans.back() = ')';
  for (int i = 1; i < (int)s.size() - 1; i++) {
    if (s[i] == '?') {
      if (c1) {
        ans[i] = '(';
        c1--;
      } else {
        ans[i] = ')';
      }
    }
  }
  if (check(ans.substr(1, n - 2)))
    cout << ans;
  else
    cout << ":(";
  return 0;
}
