#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5;
long long mod = 1e9 + 7;
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * a) % mod;
    n >>= 1;
    a = (a * a) % mod;
  }
  return res;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  int n;
  string s;
  cin >> n >> s;
  if (n % 2 == 1) {
    cout << ":(";
    return 0;
  }
  int close = 0, open = 0;
  if (s[0] == '?' || s[0] == '(')
    s[0] = '(';
  else {
    cout << ":(";
    return 0;
  }
  if (s[n - 1] == '?' || s[n - 1] == ')')
    s[n - 1] = ')';
  else {
    cout << ":(";
    return 0;
  }
  bool win = 1;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      open++;
    else if (s[i] == ')')
      close++;
  }
  open = n / 2 - open;
  close = n / 2 - close;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '?') {
      if (open) {
        s[i] = '(';
        open--;
      } else if (close) {
        s[i] = ')';
        close--;
      }
    }
  }
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      cnt++;
    else
      cnt--;
    if (i == n - 1 && cnt != 0) {
      win = 0;
    }
    if (cnt <= 0 && i != n - 1) {
      win = 0;
      break;
    }
  }
  if (win)
    cout << s;
  else
    cout << ":(";
  return 0;
}
