#include <bits/stdc++.h>
using namespace std;
long long const N = 5 * 1e5 + 5;
long long x1, r, x2, c, q, y, l, e, y2, d, ans, a[N], aaa[N], b, y3, k,
    pref[5005][4];
long long m, n;
bool us[N], uss[N];
char z, x;
vector<long long> v;
set<long long> st;
string t, second, ss;
pair<long long, long long> p[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> second;
  if (n % 2 != 0 || second[n - 1] == '(' || second[0] == ')')
    return cout << ":(", 0;
  for (int i = 0; i < n; i++) {
    if (second[i] == '(') q++;
  }
  if (q > n / 2) return cout << ":(", 0;
  for (int i = 0; i < n; i++) {
    if (second[i] == '?' && q < n / 2)
      q++, second[i] = '(';
    else if (second[i] == '?')
      second[i] = ')';
  }
  for (int i = 0; i < n - 1; i++) {
    if (second[i] == '(')
      k++;
    else
      k--;
    if (k <= 0) return cout << ":(", 0;
  }
  k--;
  if (k != 0)
    cout << ":(";
  else
    cout << second;
}
