#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int read() {
  int x = 0, f = 1;
  char ch;
  while (!isdigit(ch = getchar())) (ch == '-') && (f = -f);
  for (x = ch ^ 48; isdigit(ch = getchar());
       x = (x << 3) + (x << 1) + (ch ^ 48))
    ;
  return x * f;
}
template <class T>
T Max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T Min(T a, T b) {
  return a < b ? a : b;
}
char s[N], ch[N];
int n, cnt, tot;
int main() {
  n = read();
  scanf("%s", s + 1);
  for (int i = 1; i <= n; ++i) ch[i] = s[i];
  for (int i = 1; i <= n; ++i)
    if (ch[i] == ')') cnt++;
  if (cnt > n / 2) return puts(":("), 0;
  for (int i = n; i; --i) {
    if (cnt == n / 2) break;
    if (ch[i] == '?') ch[i] = ')', cnt++;
    if (cnt == n / 2) break;
  }
  for (int i = 1; i <= n; ++i)
    if (ch[i] == '?') ch[i] = '(';
  for (int i = 1; i <= n; ++i) {
    if (ch[i] == '(')
      tot++;
    else
      tot--;
    if (tot < 0 || (i != n && tot == 0) || (i == n && tot != 0))
      return puts(":("), 0;
  }
  printf("%s\n", ch + 1);
  return 0;
}
