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