#include <bits/stdc++.h>
using namespace std;
const int N = 300005, M = 1000000007, BIG = 0x3f3f3f3f;
int n;
string s;
void Process() {
  cin >> n >> s;
  if (s[0] == ')' || s[n - 1] == '(') {
    cout << ":(\n";
    return;
  }
  if (s[0] == '?') s[0] = '(';
  if (s[n - 1] == '?') s[n - 1] = ')';
  int x = 0, y = 0;
  for (int i = 1; i < n - 1; i++) {
    if (s[i] == '(')
      x++;
    else if (s[i] == ')') {
      y++;
      if (y > x) {
        for (int j = i - 1; j; j--) {
          if (s[j] == '?') {
            s[j] = '(';
            x++;
            break;
          }
        }
        if (y > x) {
          cout << ":(\n";
          return;
        }
      }
    }
  }
  x = y = 0;
  for (int i = n - 2; i; i--) {
    if (s[i] == '(') {
      x++;
      if (x > y) {
        for (int j = i + 1; j < n - 1; j++) {
          if (s[j] == '?') {
            s[j] = ')';
            y++;
            break;
          }
        }
        if (x > y) {
          cout << ":(\n";
          return;
        }
      }
    } else if (s[i] == ')')
      y++;
  }
  x = y = 0;
  for (int i = 1; i < n - 1; i++) {
    if (s[i] == '(')
      x++;
    else if (s[i] == ')')
      y++;
  }
  for (int i = 1; i < n - 1; i++) {
    if (s[i] == '?') {
      if (x > y) {
        s[i] = ')';
        y++;
      } else {
        s[i] = '(';
        x++;
      }
    }
  }
  if (x == y)
    cout << s << "\n";
  else
    cout << ":(\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) Process();
  return 0;
}
