#include <bits/stdc++.h>
using namespace std;
namespace _ {
bool rEOF = 1;
inline char nc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && rEOF &&
                 (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? (rEOF = 0, EOF)
             : *p1++;
}
template <class _T>
inline bool read(_T &num) {
  char c = nc(), f = 1;
  num = 0;
  while (c < '0' || c > '9') c == '-' && (f = -1), c = nc();
  while (c >= '0' && c <= '9') num = num * 10 + c - '0', c = nc();
  return (bool)(num *= f);
}
inline bool need(char &c) {
  return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
}
inline bool read_str(char *a) {
  while ((*a = nc()) && need(*a) && rEOF) ++a;
  *a = '\0';
  return rEOF;
}
}  // namespace _
using namespace _;
char a[300005];
stack<int> s;
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", a + 1);
  if (!((a[1] == '(' || a[1] == '?') && (a[n] == ')' || a[n] == '?'))) {
    printf(":(\n");
    return 0;
  }
  if (n % 2 == 1) {
    printf(":(\n");
    return 0;
  }
  a[1] = '(', a[n] = ')';
  int k1 = (n - 2) / 2;
  int k2 = k1;
  for (int i = 2; i <= n - 1; i++) {
    if (a[i] == '(') k1--;
    if (a[i] == ')') k2--;
  }
  for (int i = 2; i <= n - 1; i++) {
    if (a[i] == '?') {
      if (k1 > 0)
        a[i] = '(', k1--;
      else if (k2 > 0)
        a[i] = ')', k2--;
    }
  }
  if (k1 < 0 || k2 < 0) {
    printf(":(\n");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (a[i] == '?') {
      printf(":(\n");
      return 0;
    }
  for (int i = 1; i <= n; i++) {
    if (a[i] == '(')
      s.push(1);
    else
      s.pop();
    if (s.size() == 0 && i != n) {
      printf(":(\n");
      return 0;
    }
  }
  printf("%s\n", a + 1);
  return 0;
}
