#include <bits/stdc++.h>
using namespace std;
int n, m, k;
string s;
long long ans;
bool flag;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int r = 0;
  for (auto i = 0; i < n; i++) {
    if (s[i] == '(') r++;
  }
  int h = n / 2;
  if (r > h || n % 2 != 0) {
    cout << ":(";
    return;
  }
  for (auto i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (r < h) {
        r++;
        s[i] = '(';
      } else
        s[i] = ')';
    }
  }
  int stack = 0;
  for (auto i = 0; i < n - 1; i++) {
    if (s[i] == '(')
      stack++;
    else if (s[i] == ')')
      stack--;
    if (stack <= 0) {
      cout << ":(";
      return;
    }
  }
  if (s[n - 1] == ')') stack--;
  if (stack != 0) {
    cout << ":(";
    return;
  }
  cout << s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
