#include <bits/stdc++.h>
const int N = 3e5 + 5;
int n, cnt1, cnt2, cnt;
char s[N];
int sum[N], a[N];
int char_to_int(char ch) {
  if (ch == '(') return -1;
  if (ch == ')') return 1;
  return 0;
}
char int_to_char(int x) {
  if (x == -1) return '(';
  if (x == 1) return ')';
  return '?';
}
int main() {
  scanf("%d%s", &n, s + 1);
  if (n % 2 == 1) {
    printf(":(\n");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (s[i] == '(')
      cnt1++;
    else if (s[i] == ')')
      cnt2++;
  for (int i = 1; i <= n; i++) a[i] = char_to_int(s[i]);
  cnt1 = n / 2 - cnt1;
  cnt2 = n / 2 - cnt2;
  if (cnt1 < 0 || cnt2 < 0) {
    printf(":(\n");
    return 0;
  }
  for (int i = n; i; i--) {
    if (a[i] == 0) {
      if (cnt2)
        cnt2--, a[i] = 1;
      else
        cnt1--, a[i] = -1;
    }
  }
  sum[n] = a[n];
  for (int i = n - 1; i; i--) sum[i] = sum[i + 1] + a[i];
  for (int i = 1; i <= n; i++)
    if (sum[i] <= 0) cnt++;
  if (cnt >= 2)
    printf(":(\n");
  else
    for (int i = 1; i <= n; i++) printf("%c", int_to_char(a[i]));
  puts("");
  return 0;
}
