#include <bits/stdc++.h>
using namespace std;
int b[300005] = {0};
stack<char> ch;
int main() {
  int n;
  cin >> n;
  char a[300005], ans[300005];
  cin >> a;
  int l = 0, r = 0;
  for (int i = 0; i <= n - 1; i++)
    if (a[i] == '(')
      l++;
    else if (a[i] == ')')
      r++;
  l = n / 2 - l;
  r = n / 2 - r;
  for (int i = 0; i <= n - 1; i++) {
    if (a[i] == '?') {
      if (l) {
        a[i] = '(';
        l--;
      } else {
        while (a[i]) {
          if (a[i] == '?') a[i] = ')';
          i++;
        }
        break;
      }
    }
  }
  ch.push(a[0]);
  int i = 1;
  int ok = 1;
  while (a[i]) {
    if (a[i] == '(')
      ch.push(a[i]);
    else {
      if (ch.top() == '(') {
        ch.pop();
        if (ch.empty() && a[i + 1]) {
          ok = 0;
          break;
        }
      } else {
        ok = 0;
        break;
      }
    }
    i++;
  }
  if (!ch.empty()) ok = 0;
  if (ok)
    cout << a;
  else
    cout << ":(";
}
