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