#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<char> s(n);
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  if (n % 2 != 0 || s[0] == ')' || s[n - 1] == '(') {
    cout << ":(";
    return 0;
  }
  s[0] = '(';
  s[n - 1] = ')';
  map<char, int> m, need;
  m['?'] = 0;
  m[')'] = 0;
  need[')'] = 0;
  m['('] = 0;
  need['('] = 0;
  for (int i = 1; i < n - 1; i++) {
    if (s[i] == '(') {
      m['(']++;
      need[')']++;
      need['(']--;
    }
    if (s[i] == ')') {
      m[')']++;
      need['(']++;
      need[')']--;
    }
    if (s[i] == '?') {
      m['?']++;
    }
  }
  if (need['('] < 0) need['('] = 0;
  if (need[')'] < 0) need[')'] = 0;
  if ((m['?'] - m[')'] - m['(']) % 2 != 0) {
    cout << ":(";
    return 0;
  }
  int col_1 = need['('] + (m['?'] - need[')'] - need['(']) / 2;
  int col_2 = need[')'] + (m['?'] - need[')'] - need['(']) / 2;
  for (int i = 1; i < n - 1 && col_1 != 0; i++) {
    if (s[i] == '?') {
      s[i] = '(';
      col_1--;
    }
  }
  for (int i = n - 2; i >= 1 && col_2 != 0; i--) {
    if (s[i] == '?') {
      s[i] = ')';
      col_2--;
    }
  }
  int depth = 0;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == '(') {
      depth++;
    }
    if (s[i] == ')') {
      depth--;
    }
    if (depth <= 0) {
      cout << ":(";
      return 0;
    }
  }
  depth--;
  if (depth != 0) {
    cout << ":(";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cout << s[i];
  }
  return 0;
}
