#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int i;
  if (n % 2 == 1) {
    cout << ":(" << endl;
    return 0;
  }
  int a = 0, b = 0, c = 0;
  int curr = 0;
  for (i = 0; i < n; i++)
    if (s[i] == '(')
      curr++;
    else if (s[i] == ')')
      curr--;
    else
      c++;
  if (curr > 0) {
    b = curr;
  } else if (curr < 0) {
    a = abs(curr);
  }
  bool flag = true;
  if (a > c || b > c)
    flag = false;
  else {
    int rest = c - a - b;
    if (rest % 2 == 1)
      flag = false;
    else {
      b += rest / 2;
      a += rest / 2;
    }
  }
  if (flag == false) {
    cout << ":(" << endl;
    return 0;
  }
  for (i = 0; i < n; i++)
    if (s[i] == '?')
      if (a) {
        s[i] = '(';
        a--;
      } else
        s[i] = ')';
  curr = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '(')
      curr++;
    else
      curr--;
    if (i != n - 1 && curr <= 0) {
      flag = false;
      break;
    } else if (i == n - 1 && curr != 0) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << s;
  else
    cout << ":(" << endl;
}
