#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int cont1 = 0;
  int cont2 = 0;
  if ((s[0] == ')') || (s[n - 1] == '(') || (n % 2 == 1)) {
    cout << ":(" << endl;
    return 0;
  }
  string s1(s, 1, n - 2);
  int n1 = s1.size();
  int cont3 = 0;
  int cont4 = 0;
  int h = n1 / 2;
  for (int i = 0; i < n1; i++) {
    if (s1[i] == ')') cont3++;
    if (s1[i] == '(') cont4++;
  }
  int j = 0;
  int f = h - cont4;
  for (int i = 0; i < n1; i++)
    if ((s1[i] == '?') && (f > 0)) s1[i] = '(', f--;
  f = h - cont3;
  for (int i = n1 - 1; i >= 0; i--)
    if ((s1[i] == '?') && (f > 0)) s1[i] = ')', f--;
  bool g = 0;
  for (int i = 0; i < n1; i++) {
    if (s1[i] == '?') {
      if (g == 0) {
        s1[i] = '(';
        g = 1;
      } else if (g == 1) {
        s1[i] = ')';
        g = 0;
      }
    }
  }
  for (int i = 0; i < n1; i++) {
    if (s1[i] == '(')
      cont1++;
    else
      cont1--;
    if (cont1 < 0) {
      cout << ":(" << endl;
      return 0;
    }
  }
  if (cont1 != 0)
    cout << ":(" << endl;
  else
    cout << '(' << s1 << ')';
  return 0;
}
