#include <bits/stdc++.h>
using namespace std;
char z[300005], ans[300005];
int st[300005], last, Min = 1e9, first, cnt[300005], chk;
int main() {
  int i, j, n;
  scanf("%d %s", &n, z);
  if (n % 2 != 0) {
    printf(":(");
    return 0;
  }
  if (n == 2) {
    if (z[0] == '?') z[0] = '(';
    if (z[1] == '?') z[1] = ')';
    if (z[0] == '(' && z[1] == ')')
      printf("()");
    else
      printf(":(");
    return 0;
  }
  if (z[0] == ')' || z[n - 1] == '(' || n == 1) {
    printf(":(");
    return 0;
  }
  z[0] = ans[0] = '(';
  z[n - 1] = ans[n - 1] = ')';
  cnt[0] = 1;
  i = 0;
  for (int _i = n; i < _i; i++) {
    if (z[i] == '?') {
      first = i;
      break;
    }
  }
  for (i = 1; i < n; i++) {
    cnt[i] = cnt[i - 1];
    if (z[i] == '(') {
      cnt[i]++;
      ans[i] = '(';
    } else if (z[i] == ')') {
      cnt[i]--;
      ans[i] = ')';
      if (cnt[i] == 0 && i != n - 1) {
        printf(":(");
        return 0;
      }
    } else if (z[i] == '?') {
      cnt[i]++;
      ans[i] = '(';
    }
  }
  cnt[n] = cnt[n - 1];
  for (i = n - 2; i >= 1; i--) {
    if (z[i] == '?') {
      ans[i] = ')';
      cnt[n] -= 2;
      Min = min(Min - 2, cnt[i] - 2);
    }
    if (Min <= 0 || cnt[n] < 0) {
      printf(":(");
      return 0;
    }
    if (cnt[n] == 0) break;
  }
  if (i == 0) {
    printf(":(");
    return 0;
  }
  i = 0;
  for (int _i = n; i < _i; i++) {
    if (ans[i] == '(')
      chk++;
    else if (ans[i] == ')') {
      chk--;
      if (chk == 0 && i != n - 1) {
        printf(":(");
        return 0;
      }
    } else {
      printf(":(");
      return 0;
    }
  }
  i = 0;
  for (int _i = n; i < _i; i++) printf("%c", ans[i]);
  return 0;
}
