#include <bits/stdc++.h>
using namespace std;
int n, n1, n2;
string s;
void fk() {
  cout << ":(";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  if (n & 1) fk();
  for (char c : s) {
    if (c == '(')
      ++n1;
    else if (c == ')')
      ++n2;
  }
  if (n1 > n / 2 || n2 > n / 2) fk();
  n1 = n / 2 - n1;
  for (char &c : s) {
    if (c == '?') {
      if (n1) {
        --n1;
        c = '(';
      } else {
        c = ')';
      }
    }
  }
  int b = 0;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == '(')
      ++b;
    else
      --b;
    if (b <= 0) fk();
  }
  cout << s;
}
