#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-8;
const long long INF = 1e18 + 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;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) {
    write(x / 10);
  }
  putchar(x % 10 + '0');
}
bool check(string ss) {
  stack<char> a;
  for (long long i = 0; i < ss.length(); i++) {
    if (ss[i] != '(' && ss[i] != ')') {
      ss.erase(i, 1);
      i--;
    }
  }
  for (long long i = 0; i < ss.length(); i++) {
    if (ss[i] == '(') {
      a.push(ss[i]);
    } else {
      if (a.empty()) {
        return false;
      } else {
        if (a.top() == '(' && ss[i] != ')') {
          return false;
        } else {
          a.pop();
        }
      }
    }
  }
  bool flag1 = a.empty(), flag2 = true;
  long long cnt = 0;
  for (long long i = 1; i < ss.length() - 1; i++) {
    if (ss[i] == '(')
      cnt++;
    else {
      cnt--;
      if (cnt < 0) flag2 = false;
    }
  }
  return (flag1 && flag2 && !cnt);
}
string s, ans;
long long n, cnt1, cnt2;
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  cin >> s;
  if (s[0] == '?') s[0] = '(';
  if (s[n - 1] == '?') s[n - 1] = ')';
  long long i, j;
  for (i = 1; i < n - 1; i++) {
    if (s[i] == '(') cnt1++;
    if (s[i] == ')') cnt2++;
  }
  if (n % 2 == 1 || cnt1 > n / 2 || cnt2 > n / 2 || s[0] != '(' ||
      s[n - 1] != ')') {
    cout << ":(";
    return 0;
  }
  for (i = 1; i < n - 1; i++) {
    if (s[i] == '?') {
      if (cnt1 + 2 <= n / 2) {
        s[i] = '(';
        cnt1++;
      } else {
        s[i] = ')';
        cnt2++;
      }
    }
  }
  if (check(s)) {
    cout << s;
  } else
    cout << ":(";
  return 0;
}
