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