#include <bits/stdc++.h>
using namespace std;
void fail() {
  cout << ":(" << endl;
  exit(0);
}
int main() {
  int N;
  string S;
  cin >> N >> S;
  if (N % 2) fail();
  int sum = 0, q = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '?') {
      q++;
    } else {
      sum += S[i] == '(' ? 1 : -1;
    }
  }
  int L = (q - sum) / 2;
  int R = q - L;
  if (L < 0 || R < 0) fail();
  for (int i = 0; i < N; i++) {
    if (S[i] == '?') {
      if (L > 0) {
        L--;
        S[i] = '(';
      } else {
        S[i] = ')';
      }
    }
  }
  sum = 0;
  for (int i = 0; i < N; i++) {
    sum += S[i] == '(' ? 1 : -1;
    if (i < N - 1 && sum <= 0) fail();
  }
  if (sum != 0) fail();
  cout << S << endl;
  return 0;
}
