#include <bits/stdc++.h>
using namespace std;
void dbg_out() { cerr << "\b\b]\n"; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << H << ", ";
  dbg_out(T...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  string s;
  cin >> s;
  if ((n & 1) or s[0] == ')' or s[n - 1] == '(') {
    cout << ":(";
    return 0;
  }
  int curr = 0, open = 0, close = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == ')')
      close++;
    else if (s[i] == '(')
      open++;
  }
  if (open > (n / 2) or close > n / 2) {
    cout << ":(";
    return 0;
  }
  int extra = n / 2 - open;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '?') {
      if (extra > 0) {
        s[i] = '(';
        extra--;
      } else
        s[i] = ')';
    }
  }
  for (int i = 0; i < n; ++i) {
    curr += (s[i] == '(' ? 1 : -1);
    if (i < n - 1 and curr <= 0) {
      cout << ":(";
      return 0;
    }
  }
  cout << (curr != 0 ? ":(" : s);
  return 0;
}
