#include <bits/stdc++.h>
using namespace std;
const int MOD = 100000007;
const int MAXN = 1000000;
const int inf = 0x3f3f3f3f;
char str[300005];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", str);
  int len = strlen(str), fo = 1, x = 0, sum = 0;
  if (len & 1) fo = 0;
  for (int i = 0; i < len; i++) {
    if (str[i] == '(')
      x++;
    else if (str[i] == ')')
      x--;
    else if (str[i] == '?')
      sum++;
  }
  int a = (sum - x) / 2, b = sum - a;
  for (int i = 0; i < len; i++) {
    if (str[i] == '?') {
      if (a > 0) {
        str[i] = '(';
        a--;
      } else if (b > 0) {
        str[i] = ')';
        b--;
      }
    }
  }
  int now = 0;
  for (int i = 0; i < len - 1; i++) {
    if (str[i] == '(')
      now++;
    else if (str[i] == ')')
      now--;
    if (now == 0 || now < 0) {
      fo = 0;
      break;
    }
  }
  if (str[len - 1] == '(')
    now++;
  else if (str[len - 1] == ')')
    now--;
  if (now != 0) fo = 0;
  if (fo == 0)
    printf(":(\n");
  else
    printf("%s\n", str);
  return 0;
}
