#include <bits/stdc++.h>
const unsigned int M = 1000000007;
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = x * res;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
void nik() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
signed main() {
  nik();
  long long t = 1;
  while (t--) {
    long long n, on = 0, ron, cnt = 0, off = 0;
    cin >> n;
    string s, ans = "";
    cin >> s;
    for (long long i = 0; i < (long long)s.size(); i++) {
      if (s[i] == '(')
        on++;
      else if (s[i] == ')')
        off++;
    }
    if (n % 2) return cout << ":(", 0;
    ron = n / 2 - on;
    for (long long i = 0; i < (long long)s.size(); i++) {
      if (s[i] == '?') {
        if (ron)
          s[i] = '(', ron--;
        else
          s[i] = ')';
      }
    }
    long long ok = 1;
    for (long long i = 0; i < (long long)s.size(); i++) {
      if (s[i] == '(')
        cnt++;
      else
        cnt--;
      if (cnt <= 0 && i != s.size() - 1) {
        ok = 0;
        break;
      }
    }
    if (ok && cnt == 0)
      cout << s;
    else
      cout << ":(";
  }
  return 0;
}
