#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int l = 0, r = 0, q = 0, a, b, c;
  scanf("%d", &a);
  cin >> s;
  a = 0, b = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      l++;
    else if (s[i] == ')')
      r++;
    else
      q++;
  }
  if ((s.size() & 1)) {
    cout << ":(" << endl;
    return 0;
  }
  if (l > (s.size() / 2) or r > (s.size() / 2)) {
    cout << ":(" << endl;
    return 0;
  }
  int x = (s.size() / 2) - l, y = (s.size() / 2) - r;
  int key = 1;
  for (int i = 0; i < s.size(); i++) {
    if (a <= b and i != 0) {
      cout << ":(" << endl;
      return 0;
    }
    if (s[i] == '(')
      a++;
    else if (s[i] == ')')
      b++;
    else {
      if (x != 0) {
        s[i] = '(';
        x--;
        a++;
      } else {
        s[i] = ')';
        y--;
        b++;
      }
    }
  }
  if (a != b) {
    cout << ":(" << endl;
  } else
    cout << s << endl;
  return 0;
}
