#include <bits/stdc++.h>
using namespace std;
int n, q, sum;
string s;
void solve() {
  cin >> n >> s;
  for (auto i : s) {
    if (i == '?')
      q++;
    else
      sum += (i == '(') - (i == ')');
  }
  if ((q - sum) % 2 or q - sum < 0) {
    cout << ":(";
    return;
  }
  int o = (q - sum) / 2;
  int c = q - o;
  if (c < 0) {
    cout << ":(";
    return;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (o) {
        s[i] = '(';
        o--;
      } else {
        s[i] = ')';
      }
    }
  }
  int cur = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cur++;
    else
      cur--;
    if (cur < 0 or (cur == 0 and i != n - 1)) {
      cout << ":(";
      return;
    }
  }
  if (cur) {
    cout << ":(";
    return;
  }
  cout << s << '\n';
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
