#include <bits/stdc++.h>
using namespace std;
const long long N = (long long)(1e6 + 7);
const long long INF = (long long)(1e18 + 7);
const long long MOD = (long long)(1e9 + 7);
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n;
  cin >> n;
  string str;
  cin >> str;
  long long op[n + 1], q[n + 1];
  op[n] = q[n] = 0;
  for (long long i = n - 1; i >= 0; i--) {
    if (str[i] == ')') {
      q[i] = q[i + 1];
      op[i] = op[i + 1] - 1;
    } else if (str[i] == '(') {
      q[i] = q[i + 1];
      op[i] = op[i + 1] + 1;
    } else {
      q[i] = q[i + 1] + 1;
      op[i] = op[i + 1];
    }
  }
  if (str[0] == ')' || n % 2 == 1) {
    cout << ":(";
    exit(0);
  }
  long long cnt = 0;
  string res = "";
  if (str[0] == '?') {
    cnt++;
    res += '(';
  } else {
    cnt++;
    res += str[0];
  }
  for (long long i = 1; i < n; i++) {
    if (str[i] == '(') {
      cnt++;
      res += str[i];
    } else if (str[i] == ')') {
      cnt--;
      res += str[i];
    } else {
      if (cnt < (q[i] - op[i])) {
        cnt++;
        res += '(';
      } else {
        cnt--;
        res += ')';
      }
    }
    if (cnt == 0 && i != n - 1) {
      cout << ":(";
      exit(0);
    }
  }
  cout << (cnt == 0 ? res : ":(");
}
