#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
char a[maxn];
int main() {
  int n;
  scanf("%d%s", &n, a + 1);
  if (n % 2 == 1) {
    printf(":(\n");
    return 0;
  }
  int s1 = 0, s2 = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] == '(')
      s1++;
    else if (a[i] == ')')
      s2++;
  }
  int n1 = n / 2 - s1;
  int n2 = n / 2 - s2;
  for (int i = 1; i <= n; i++) {
    if (a[i] == '?' && n1 > 0) {
      a[i] = '(';
      n1--;
    } else if (a[i] == '?') {
      a[i] = ')';
      n2--;
    }
  }
  int sum = 0;
  int f = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] == '(')
      sum++;
    else
      sum--;
    if (sum <= 0) {
      f = 0;
      break;
    }
  }
  if (a[n] == ')') sum--;
  if (sum != 0) f = 0;
  if (f) {
    printf("%s\n", a + 1);
  } else
    printf(":(\n");
}
