#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n % 2) {
    cout << ":(" << endl;
    return 0;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') cnt++;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (cnt < n / 2) {
        s[i] = '(';
        cnt++;
      } else
        s[i] = ')';
    }
  }
  cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cnt++;
    else
      cnt--;
    if (cnt < 0 || (cnt == 0 && i != n - 1)) {
      cout << ":(" << endl;
      return 0;
    }
  }
  if (cnt)
    cout << ":(" << endl;
  else
    cout << s << endl;
  return 0;
}
