#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int o = 0, c = 0, q = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '?')
      q++;
    else if (s[i] == '(')
      o++;
    else
      c++;
  }
  int to = 0, tc = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (o < n / 2) {
        s[i] = '(';
        o++;
      } else
        s[i] = ')';
    }
    if (s[i] == '(')
      to++;
    else
      tc++;
    if (i < n - 1)
      if (tc >= to) {
        cout << ":(";
        return 0;
      }
    if (tc > to) {
      cout << ":(";
      return 0;
    }
    if (to > n / 2) {
      cout << ":(";
      return 0;
    }
  }
  cout << s;
  return 0;
}
