#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  string s;
  cin >> n >> s;
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') cnt++;
  }
  for (long long i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (cnt < n / 2) {
        s[i] = '(';
        cnt++;
      } else
        s[i] = ')';
    }
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(')
      ans++;
    else
      ans--;
    if (ans < 1 and i < n - 1 or (i == n - 1 and ans != 0)) {
      cout << ":(" << endl;
      return 0;
    }
  }
  cout << s << endl;
  return 0;
}
