#include <bits/stdc++.h>
using namespace std;
void test_case() {
  long long int n;
  cin >> n;
  string s1;
  cin >> s1;
  if (s1[0] == ')' || s1[n - 1] == '(' || n % 2 == 1) {
    cout << ":(" << endl;
    return;
  }
  string s = s1;
  s[0] = '(';
  s[n - 1] = ')';
  long long int d = 0;
  for (long long int i = 1; i < n - 1; i++) {
    if (s[i] == '(') {
      d++;
      continue;
    } else if (s[i] == ')') {
      d--;
      while (d < 0) {
        long long int j = i;
        while (j > 0 && !(s[j] == ')' && s1[j] == '?')) j--;
        if (j == 0) {
          cout << ":(" << endl;
          return;
        }
        s[j] = '(';
        d += 2;
      }
      continue;
    }
    if (d == 0) {
      s[i] = '(';
      d++;
    } else if (d > 0) {
      s[i] = ')';
      d--;
    }
  }
  if (d != 0) {
    cout << ":(" << endl;
    return;
  }
  cout << s << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  while (t--) test_case();
  return 0;
}
