#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, t = 0;
  cin >> N;
  string S;
  cin >> S;
  for (long long i = 0; i < N; i++)
    if (S[i] == '(') t++;
  long long a = 0;
  for (long long i = 0; i < N; i++) {
    if (S[i] == '?') {
      if (2 * t < N)
        S[i] = '(', t++;
      else
        S[i] = ')';
    }
    if (S[i] == '(') a++;
    if ((i != N - 1 && 2 * a <= i + 1) || (i == N - 1 && 2 * a != i + 1))
      return cout << ":(" && 0;
  }
  cout << S << endl;
}
