#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int MAX = 300005;
long long modexp(long long x, long long n) {
  if (n == 0) return 1LL;
  if (n % 2 == 0) {
    long long y = modexp(x, n / 2) % mod;
    return (y * y) % mod;
  }
  return (x * modexp(x, n - 1) % mod) % mod;
}
long long powr(long long x, long long n) {
  long long ans = 1;
  for (int i = 1; i <= n; i++) ans = ans * x;
  return ans;
}
int a[MAX];
int b[MAX];
int main() {
  int n;
  scanf("%d", &n);
  string s;
  cin >> s;
  if (s[0] == '?') s[0] = '(';
  if (s[n - 1] == '?') s[n - 1] = ')';
  if (n % 2) return 0 * printf(":(\n");
  int ques = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') ques++;
  }
  if (ques == 0) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == '(')
        cnt++;
      else
        cnt--;
      if (cnt < 0) return 0 * printf(":(\n");
      if (cnt == 0 && (i != n - 1)) return 0 * printf(":(\n");
    }
    if (cnt > 0)
      printf(":(\n");
    else
      cout << s << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == ')')
      a[i] = -1;
    else
      a[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      b[i] = 1;
    else
      b[i] = -1;
  }
  for (int i = n - 2; i >= 0; i--) {
    b[i] += b[i + 1];
  }
  for (int i = 1; i < n; i++) {
    a[i] += a[i - 1];
  }
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] < 0 || b[i] > 0) {
      flag = 1;
      break;
    }
    if (a[i] == 0) {
      if (i != n - 1) {
        flag = 1;
        break;
      }
    }
    if (b[i] == 0) {
      if (i != 0) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 1) {
    printf(":(\n");
    return 0;
  }
  int cnt = 1;
  deque<int> st;
  for (int i = 1; i < n - 1; i++) {
    if (s[i] != ')') {
      if (s[i] == '(')
        st.push_back(i);
      else
        st.push_front(i);
    } else {
      if (st.empty() == true) {
        return 0 * printf(":(\n");
      }
      int idx = st.back();
      st.pop_back();
      if (s[idx] == '?') s[idx] = '(';
    }
  }
  while (st.size() > 0) {
    int x = st.back();
    int y = st.front();
    st.pop_back();
    st.pop_front();
    if (s[x] == '(') {
      if (x > y) return 0 * printf(":(\n");
      s[y] = ')';
    } else {
      if (x < y) {
        s[x] = '(';
        s[y] = ')';
      } else {
        s[x] = ')';
        s[y] = '(';
      }
    }
  }
  cout << s << endl;
  return 0;
}
