#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 9, oo = 0x3f3f3f3f;
int n, m, h;
int ans[N][N], f[N], l[N], top[N][N], vis[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  string s;
  cin >> n >> s;
  if (n & 1) {
    cout << ":(";
    return 0;
  }
  stack<char> st;
  bool f = 1;
  int c1 = 0, c2 = 0;
  for (int i = 0; i < n; ++i) {
    c1 += (s[i] == '(');
    c2 += (s[i] == ')');
  }
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '(')
      st.push(s[i]);
    else if (s[i] == ')' && !st.empty())
      st.pop();
    else if (s[i] == '?') {
      if (i < n - 1 && st.size() == 1) {
        st.push('(');
        s[i] = '(';
        c1++;
      } else if (i == n - 1 && st.size() == 1) {
        s[i] = ')';
        st.pop();
        c2++;
      } else if (c1 < n / 2) {
        c1++;
        s[i] = '(';
        st.push('(');
      } else if (c2 < n / 2) {
        c2++;
        s[i] = ')';
        st.pop();
      }
    }
    if (i < n - 1 && st.empty()) {
      cout << ":(";
      return 0;
    }
  }
  stack<char> ch;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '(')
      ch.push('(');
    else if (s[i] == ')' && !ch.empty())
      ch.pop();
    else {
      cout << ":(";
      return 0;
    }
  }
  if (ch.empty())
    cout << s;
  else
    cout << ":(";
  return 0;
}
