#include <bits/stdc++.h>
using namespace std;
const bool debug = false;
const bool INJUDGE = false;
const int MAXN = 100005;
const int MOD = 1000000007;
const int INF = 1000000007;
template <class T>
T emax(T& a, T b) {
  return a = max(a, b);
}
template <class T>
T emin(T& a, T b) {
  return a = min(a, b);
}
template <class T>
void byebye(T info) {
  cout << info << endl;
  exit(0);
}
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> P) {
  out << P.first << " " << P.second;
  return out;
}
template <class T>
ostream& operator<<(ostream& out, vector<T> V) {
  for (int i = 0; i < V.size(); ++i) out << V[i] << " ";
  return out;
}
char s[300005];
int len;
int main() {
  scanf("%d", &len);
  scanf("%s", s);
  if (len & 1) byebye(":(");
  int leftq = len / 2;
  for (int i = 0; i < len; ++i) {
    if (s[i] == '(') --leftq;
  }
  if (leftq < 0) byebye(":(");
  for (int i = 0; i < len; ++i) {
    if (s[i] == '?') {
      if (leftq) {
        --leftq;
        s[i] = '(';
      } else {
        s[i] = ')';
      }
    }
  }
  int cnt = 0;
  for (int i = 0; i < len; ++i) {
    if (s[i] == '(')
      ++cnt;
    else
      --cnt;
    if (i != len - 1 && !cnt) byebye(":(");
    if (cnt < 0) byebye(":(");
  }
  if (cnt) {
    byebye(":(");
  }
  puts(s);
  return 0;
}
