#include <bits/stdc++.h>
using namespace std;
int a[1000005];
bool balParenthesis(string exp) {
  stack<char> stack;
  for (int i = 0; i < exp.length(); i++) {
    if (exp[i] == '(' || exp[i] == '{' || exp[i] == '[') {
      stack.push(exp[i]);
    }
    if (exp[i] == ')' || exp[i] == '}' || exp[i] == ']') {
      if (stack.empty()) {
        return false;
      }
      char top = stack.top();
      stack.pop();
      if ((top == '(' && exp[i] != ')') || (top == '{' && exp[i] != '}') ||
          (top == '[' && exp[i] != ']')) {
        return false;
      }
    }
  }
  return stack.empty();
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  int i, j, k, l, m, n, t;
  cin >> n;
  string str;
  string no = ":(";
  cin >> str;
  if (str[0] == ')' || str[n - 1] == '(') {
    cout << no << endl;
    return 0;
  }
  str[0] = '(';
  str[n - 1] = ')';
  int nop = 0, nc = 0;
  for (i = 1; i < n - 1; i++) {
    if (str[i] == '(')
      nop++;
    else if (str[i] == ')')
      nc++;
  }
  int tot = n - 2;
  if (tot & 1) {
    cout << no << endl;
    return 0;
  }
  int ro = tot / 2 - nop;
  int rc = tot / 2 - nc;
  if (ro < 0 || rc < 0) {
    cout << no << endl;
    return 0;
  }
  int op = 0;
  for (i = 1; i < n - 1; i++) {
    if (str[i] == '?') {
      if (ro) {
        ro--;
        str[i] = '(';
      } else {
        rc--;
        str[i] = ')';
      }
    }
  }
  string str2 = str.substr(1, n - 2);
  if (!balParenthesis(str) || !balParenthesis(str2)) {
    cout << no << endl;
    return 0;
  }
  cout << str << endl;
}
