#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  if (n % 2 == 1) {
    cout << ":(";
    return 0;
  }
  string a;
  cin >> a;
  if (a[0] == ')' || a[n - 1] == '(' || a[1] == ')' || a[n - 2] == '(') {
    cout << ":(";
    return 0;
  }
  long long int s = 0, d = 0;
  a[0] = '(';
  a[n - 1] = ')';
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    if (a[i] == '(') {
      sum++;
    }
  }
  if (sum > n / 2) {
    cout << ":(";
    return 0;
  }
  long long int p = n / 2 - sum;
  sum = 1;
  long long int br = 0;
  for (long long int i = 1; i < n; i++) {
    if (sum <= 0) {
      cout << ":(";
      return 0;
    }
    if (a[i] == ')') {
      sum--;
    } else if (a[i] == '?' && p > 0) {
      a[i] = '(';
      sum++;
      p--;
    } else if (a[i] == '?' && p <= 0) {
      a[i] = ')';
      sum--;
    } else {
      sum++;
    }
  }
  cout << a;
}
