#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int n, m, h;
bool c[1999][1000];
int res[1000][1000], a[1000], b[1000];
int main() {
  cin >> n;
  if (n % 2 == 1) {
    cout << ":(";
    return 0;
  }
  string s;
  cin >> s;
  int m = 0;
  int q = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      m++;
    else if (s[i] == ')')
      m--;
    else
      q++;
  }
  if (q < abs(m)) {
    cout << ":(";
    return 0;
  }
  int i = 0;
  while (i < n) {
    while (s[i] != '?') {
      i++;
      if (i == n) break;
    }
    if (i == n) break;
    if (q > m) {
      s[i] = '(';
      q--;
      m++;
    } else {
      s[i] = ')';
      q--;
      m--;
    }
    if (q <= 0) break;
  }
  m = 1;
  if (s[0] == ')') {
    cout << ":(";
    return 0;
  }
  for (int i = 1; i < n; i++) {
    if (s[i] == '(')
      m++;
    else
      m--;
    if (m == 0 && i < n - 1) {
      cout << ":(";
      return 0;
    }
  }
  cout << s << endl;
  return 0;
}
