#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n & 1) {
    cout << ":(" << endl;
    return 0;
  }
  int cnt1, cnt2;
  cnt1 = cnt2 = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      cnt1++;
    else if (s[i] == ')')
      cnt2++;
  }
  if (cnt1 > n / 2 || cnt2 > n / 2) {
    cout << ":(" << endl;
    return 0;
  }
  cnt1 = n / 2 - cnt1;
  cnt2 = n / 2 - cnt2;
  int flag = 0;
  int cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else {
      if (cnt1) {
        s[i] = '(';
        cnt1--;
        cnt++;
      } else {
        s[i] = ')';
        cnt--;
      }
    }
    if (cnt < 0 || (cnt == 0 && i != s.size() - 1)) {
      flag = 1;
      break;
    }
  }
  if (cnt != 0) {
    flag = 1;
  }
  if (flag) {
    cout << ":(" << endl;
  } else
    cout << s << endl;
  return 0;
}
