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