#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, i, x, f = 1, y, req;
  string s;
  cin >> n;
  cin >> s;
  if ((s[0] == ')') || (n % 2)) {
    cout << ":(";
    exit(0);
  }
  y = count(s.begin(), s.end(), '(');
  req = n / 2;
  if (y > req) {
    cout << ":(";
    exit(0);
  }
  x = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '(')
      x++;
    else if (s[i] == ')')
      x--;
    else {
      if (y < req) {
        s[i] = '(';
        x++;
        y++;
      } else {
        s[i] = ')';
        x--;
      }
    }
    if (i == (n - 1)) break;
    if (x == 0) {
      f = 0;
      break;
    }
  }
  if (f == 0) {
    cout << ":(";
  } else {
    if (x == 0)
      cout << s;
    else
      cout << ":(";
  }
}
