#include <bits/stdc++.h>
using namespace std;
const long long int N = 2e5 + 5;
void solve() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  if (n % 2 == 1 || s[n - 1] == '(' || s[0] == ')' ||
      ((s[1] == ')') && n != 2)) {
    cout << ":("
         << "\n";
    return;
  }
  s[0] = '(';
  s[n - 1] = ')';
  if (n != 2) s[1] = '(';
  long long int bal = 0;
  long long int c = 0, cc = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '(') {
      cc++;
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (c < n / 2 - cc) {
        s[i] = '(';
        c++;
      } else {
        s[i] = ')';
        c++;
      }
    }
  }
  stack<char> st;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == ')') {
      if (st.empty()) {
        st.push(s[i]);
      } else if (st.top() == '(') {
        st.pop();
      } else {
        st.push(s[i]);
      }
    } else {
      st.push(s[i]);
    }
    if (st.empty() && i != n - 1) {
      cout << ":("
           << "\n";
      return;
    }
  }
  if (st.empty()) {
    cout << s << "\n";
  } else {
    cout << ":("
         << "\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) solve();
  return 0;
}
