#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 300100;
const long long INF = 2000000100;
const long long MOD = 998244353;
int N;
string S, ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> N >> S;
  if (N % 2 == 1) {
    cout << ":(\n";
    return 0;
  }
  int l = 0, c = 0;
  bool m = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '(') l++;
  }
  for (int i = 0; i < N; i++) {
    if (l >= N / 2) m = 1;
    if (c <= 0 && i != 0) {
      cout << ":(\n";
      return 0;
    }
    if (S[i] == '(') {
      c++;
      ans += '(';
    } else if (S[i] == ')') {
      c--;
      ans += ')';
    } else {
      if (m) {
        c--;
        ans += ')';
      } else {
        c++;
        l++;
        ans += '(';
      }
    }
  }
  if (c > 0) {
    cout << ":(\n";
    return 0;
  }
  cout << ans << "\n";
}
