#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  string s;
  cin >> n >> s;
  int su = 0, st = 0, fi = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == '(')
      su++;
    else if (s[i] == ')')
      su--;
    else
      fi++;
  int a = (su + fi) / 2;
  int b = fi - a;
  if (a - b != su || a < 0 || b < 0) {
    cout << ":(\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      st++;
    else if (s[i] == ')')
      st--;
    else if (s[i] == '?') {
      if (b > 0) {
        s[i] = '(';
        b--;
        st++;
      } else {
        s[i] = ')';
        st--;
      }
    }
    if (st <= 0 && i < n - 1) {
      cout << ":(\n";
      return 0;
    }
  }
  cout << s << "\n";
  return 0;
}
