#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, cnto = 0, cntc = 0, fino = 0, finc = 0;
  string s;
  cin >> n;
  cin >> s;
  stack<char> st;
  if (s.size() % 2 != 0) {
    cout << ":(" << endl;
    return 0;
  }
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '(') {
      cnto++;
    } else if (s[i] == ')') {
      cntc++;
    }
  }
  long long int x = (n / 2) - cnto;
  for (long long int i = 0; i < n; i++) {
    if (x != 0 and s[i] == '?') {
      s[i] = '(';
      x--;
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '?') {
      s[i] = ')';
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '(') {
      fino++;
    } else if (s[i] == ')') {
      finc++;
    }
  }
  if (fino == finc) {
    st.push(s[0]);
    for (int i = 1; i < n - 1; i++) {
      if (s[i] == '(') {
        st.push(s[i]);
      } else if (s[i] == ')') {
        st.pop();
      }
      if (st.size() == 0) {
        cout << ":(" << endl;
        return 0;
      }
    }
    if (s[n - 1] == '(') {
      cout << ":(" << endl;
      return 0;
    } else if (s[n - 1] == ')') {
      st.pop();
      if (st.size() == 0) {
        cout << s << endl;
      } else {
        cout << ":(" << endl;
        return 0;
      }
    }
  } else {
    cout << ":(" << endl;
  }
  return 0;
}
