#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int open = 0, close = 0, remaining = 0;
  int s = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '(') {
      open++;
    } else if (str[i] == ')') {
      close++;
    } else
      remaining++;
  }
  if (remaining == 0) {
    for (int i = 0; i < str.size() - 1; i++) {
      if (str[i] == '(') {
        s++;
      } else {
        s--;
      }
      if (s <= 0) {
        cout << ":(" << endl;
        return 0;
      }
    }
    if (str[str.size() - 1] == '(')
      s++;
    else
      s--;
    if (s == 0)
      cout << str << endl;
    else
      cout << ":(" << endl;
    return 0;
  }
  if (n % 2 != 0) {
    cout << ":(" << endl;
    return 0;
  }
  int a = (open - close >= 0) ? 0 : close - open;
  int b = (close - open >= 0) ? 0 : open - close;
  remaining -= (a + b);
  if (remaining < 0 || remaining % 2 != 0) {
    cout << ":(" << endl;
    return 0;
  }
  a += remaining / 2;
  b += remaining / 2;
  int i = 0;
  string ans = "";
  while (a > 0) {
    if (str[i] == '?') {
      ans += '(';
      a--;
    } else {
      ans += str[i];
    }
    i++;
  }
  while (b > 0) {
    if (str[i] == '?') {
      ans += ')';
      b--;
    } else {
      ans += str[i];
    }
    i++;
  }
  while (i < str.size()) {
    ans += str[i];
    i++;
  }
  int sum = 0;
  for (int i = 0; i < ans.size() - 1; i++) {
    if (ans[i] == '(')
      sum++;
    else
      sum--;
    if (sum <= 0) {
      cout << ":(" << endl;
      return 0;
    }
  }
  if (ans[ans.size() - 1] == '(')
    sum++;
  else
    sum--;
  if (sum == 0)
    cout << ans;
  else
    cout << ":(" << endl;
}
