#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = LLONG_MAX;
const long long N = 1e5 + 10;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  if (n & 1) {
    cout << ":(\n";
    return 0;
  }
  long long cnt1 = 0, cnt2 = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') {
      cnt1++;
    } else if (s[i] == ')') {
      cnt2++;
    }
  }
  long long x = (n / 2) - cnt1;
  if (x < 0) {
    cout << ":(\n";
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    if (s[i] == '?' and x > 0) {
      s[i] = '(';
      x--;
    } else if (s[i] == '?') {
      s[i] = ')';
    }
  }
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') {
      cnt++;
    }
    if (s[i] == ')') {
      cnt--;
    }
    if (cnt <= 0 and (i != n - 1)) {
      cout << ":(\n";
      return 0;
    }
  }
  if (cnt == 0) {
    cout << s << "\n";
  } else {
    cout << ":(\n";
  }
  return 0;
}
