#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  bool fine = 1;
  fine &= (n % 2 != 1);
  int open = 0;
  for (auto it : s) {
    open += (it == '(');
  }
  open = n / 2 - open;
  for (auto& it : s) {
    if (it == '?' && open > 0) {
      it = '(';
      open--;
    }
  }
  for (auto& it : s) {
    if (it == '?') {
      it = ')';
    }
  }
  int bal = 0;
  for (int i = 0; i < n; i++) {
    bal += (s[i] == '(');
    bal -= (s[i] == ')');
    if (i < n - 1) {
      fine &= (bal > 0);
    } else {
      fine &= (bal == 0);
    }
  }
  fine &= (bal == 0);
  if (fine) {
    cout << s << endl;
  } else {
    cout << ":(" << endl;
  }
}
