#include <bits/stdc++.h>
using namespace std;
char s[300005];
int n;
int l = 0, r = 0;
int addl = 0;
int lmax = 0;
int main() {
  ios::sync_with_stdio(false);
  scanf("%d", &n);
  scanf("%s", s + 1);
  if (n & 1) {
    cout << ":(" << endl;
    return 0;
  }
  lmax = n / 2;
  for (int i = 1; i <= n; ++i)
    if (s[i] == '(') --lmax;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '(')
      ++l;
    else if (s[i] == ')')
      ++r;
    else {
      if (addl < lmax)
        ++l, ++addl, s[i] = '(';
      else
        ++r, s[i] = ')';
    }
    if (r > l) {
      cout << ":(" << endl;
      return 0;
    }
    if (r == l && i < n) {
      cout << ":(" << endl;
      return 0;
    }
  }
  if (l > r) {
    cout << ":(" << endl;
    return 0;
  }
  printf("%s\n", s + 1);
  return 0;
}
