#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt0 = 0, cnt1 = 0;
  if (n % 2 == 1) {
    cout << ":(\n";
    return;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cnt0++;
    else if (s[i] == ')')
      cnt1++;
  }
  int rem0 = n / 2 - cnt0;
  int rem1 = n / 2 - cnt1;
  cnt1 = 0;
  cnt0 = 0;
  if (rem0 < 0 || rem1 < 0) {
    cout << ":(\n";
    return;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (rem0) {
        s[i] = '(';
        cnt0++;
        rem0--;
      } else {
        s[i] = ')';
        cnt1++;
        rem1--;
      }
    } else if (s[i] == '(') {
      cnt0++;
    } else
      cnt1++;
    if (cnt1 >= cnt0 && i < n - 1) {
      cout << ":(\n";
      return;
    }
  }
  if (cnt0 == cnt1)
    cout << s << "\n";
  else
    cout << ":(\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  int test;
  test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
