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