#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
char str[N];
int l, r, n;
int main() {
  scanf("%d %s", &n, str);
  if (n < 2 || n % 2 != 0) {
    printf(":(\n");
    return 0;
  }
  for (int i = 0; i < n; i += 1) {
    if (str[i] == '(')
      l += 1;
    else if (str[i] == ')')
      r += 1;
    if (l > n / 2 || r > n / 2) {
      printf(":(\n");
      return 0;
    }
  }
  for (int i = 0; i < n; i += 1) {
    if (str[i] == '?') {
      if (l < n / 2) {
        str[i] = '(';
        l += 1;
      } else {
        str[i] = ')';
        r += 1;
      }
    }
  }
  if (r > n / 2) {
    printf(":(\n");
    return 0;
  }
  l = r = 0;
  for (int i = 0; i < n; i += 1) {
    if (str[i] == '(')
      l += 1;
    else if (str[i] == ')')
      --l;
    if (l < 0 || (l == 0 && i != n - 1)) {
      printf(":(\n");
      return 0;
    }
  }
  if (l != 0)
    printf(":(\n");
  else
    printf("%s\n", str);
  return 0;
}
