#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 100;
const long long inf = 0x3f3f3f3f;
int32_t main() {
  long long n;
  scanf("%I64d", &(n));
  string s;
  cin >> s;
  long long l = n / 2, r = n / 2;
  long long a = 0, b = 0;
  if (s[0] == ')' || s[n - 1] == '(') {
    printf(":(");
    return 0;
  }
  for (long long i = (0); i <= (n - 1); i++)
    if (s[i] == '(') a++;
  for (long long i = (0); i <= (n - 1); i++)
    if (s[i] == '?') {
      if (a < l) {
        s[i] = '(';
        a++;
      } else
        s[i] = ')';
    }
  a = 0;
  for (long long i = (0); i <= (n - 1); i++) {
    if (s[i] == '(')
      a++;
    else
      b++;
    if (a == b && i != n - 1) {
      printf(":(");
      return 0;
    }
  }
  if (a != b)
    printf(":(");
  else
    cout << s;
  return 0;
}
