#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, c1 = 0, c2 = 0, c = 0;
  cin >> n;
  string s;
  cin >> s;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(')
      c1++;
    else if (s[i] == ')')
      c2++;
  }
  if (n % 2 != 0) {
    cout << ":(";
    return 0;
  }
  c1 = (n / 2) - c1;
  c2 = (n / 2) - c2;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '?' && c1 > 0) {
      s[i] = '(';
      c1--;
    } else if (s[i] == '?' && c2 > 0) {
      s[i] = ')';
      c2--;
    }
  }
  for (long long i = 0; i < n - 1; i++) {
    if (s[i] == '(')
      c++;
    else
      c--;
    if (c == 0) {
      cout << ":(";
      return 0;
    }
  }
  c = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(')
      c++;
    else
      c--;
    if (c < 0) {
      cout << ":(";
      return 0;
    }
  }
  if (c != 0) {
    cout << ":(";
    return 0;
  }
  cout << s;
}
