#include <bits/stdc++.h>
using namespace std;
int n, num, top;
string a;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a;
  for (int i = 0; i < n; i++)
    if (a[i] == ')') num++;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == '?') {
      if (num < n / 2)
        a[i] = ')', num++;
      else
        a[i] = '(';
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == '(')
      top++;
    else
      top--;
    if (top <= 0 && i != n - 1) {
      cout << ":(\n";
      return 0;
    }
  }
  if (top) {
    cout << ":(\n";
    return 0;
  }
  cout << a << "\n";
}
