#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 10;
const long long mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-7;
inline long long read() {
  long long X = 0, w = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    w |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
  return w ? -X : X;
}
char str[maxn];
int main() {
  int n = read();
  scanf("%s", str);
  if (n % 2 != 0) {
    cout << ":(" << endl;
    return 0;
  }
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < n; ++i) {
    if (str[i] == '(')
      cnt1++;
    else if (str[i] == ')')
      cnt2++;
  }
  for (int i = 0; i < n; ++i) {
    if (str[i] == '?') {
      if (cnt1 < n / 2)
        str[i] = '(', cnt1++;
      else
        str[i] = ')', cnt2++;
    }
  }
  stack<int> st;
  for (int i = 0; i < n; ++i) {
    if (str[i] == '(') {
      st.push(1);
    } else {
      if (st.empty()) {
        cout << ":(" << endl;
        return 0;
      } else {
        st.pop();
      }
      if (st.empty() && i != n - 1) {
        cout << ":(" << endl;
        return 0;
      }
    }
  }
  if (st.size()) {
    cout << ":(" << endl;
  } else
    cout << str << endl;
  return 0;
}
