#include <bits/stdc++.h>
using namespace std;
int N;
string S;
int main() {
  cin >> N;
  cin >> S;
  if (N % 2 == 1) {
    cout << ":(\n";
    return 0;
  }
  int cnt = 0;
  for (auto it : S)
    if (it == '(') cnt++;
  int L = N / 2 - cnt;
  for (int i = 0; i < N; i++)
    if (S[i] == '?') {
      if (L != 0)
        S[i] = '(', L--;
      else
        S[i] = ')';
    }
  int t = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '(') t++;
    if (S[i] == ')') t--;
    if (i < N - 1 && t <= 0) {
      cout << ":(\n";
      return 0;
    }
  }
  cout << (t == 0 ? S + "\n" : ":(\n");
  return 0;
}
