#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int x = 1, y = 0, a = 1, b = 0;
  if (n % 2 == 1) {
    cout << ":(";
    return 0;
  }
  if (s[0] != '?' && s[0] == ')') {
    cout << ":(";
    return 0;
  }
  if (s[n - 1] != '?' && s[n - 1] == '(') {
    cout << ":(";
    return 0;
  }
  if (s[0] == '?') s[0] = '(';
  if (s[n - 1] == '?') s[n - 1] = ')';
  if (n == 2) cout << s;
  if (n >= 3) {
    if (s[1] == ')' or s[n - 2] == '(') {
      cout << ":(";
      return 0;
    }
    if (s[1] == '?') s[1] = '(';
    if (s[n - 2] == '?') s[n - 2] = ')';
    for (int i = 2; i < n - 1; i++) {
      if (s[i] == '(') a++;
      if (s[i] == ')') b++;
    }
    int no = n - 2;
    if (a > no / 2 or b > no / 2) {
      cout << ":(";
      return 0;
    }
    for (int i = 2; i < n - 1; i++) {
      if (y > x) {
        cout << ":(";
        return 0;
      }
      if (s[i] == '?') {
        if (a < no / 2) {
          s[i] = '(';
          x++;
          a++;
        } else {
          s[i] = ')';
          b++;
          y++;
        }
      } else {
        if (s[i] == '(') x++;
        if (s[i] == ')') y++;
      }
    }
    if (x == y) {
      cout << s;
    } else
      cout << ":(";
  }
  return 0;
}
