#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  cin >> n >> s;
  if (s.size() % 2 != 0) return printf(":("), 0;
  int t = s.size() / 2;
  int n1 = 0, n2 = 0;
  for (auto c : s) {
    if (c == '(') n1++;
    if (c == ')') n2++;
  }
  n1 = t - n1;
  n2 = t - n2;
  if (n1 < 0 or n2 < 0) return printf(":("), 0;
  int num = 0, cnt = 0;
  for (auto &c : s) {
    cnt++;
    if (c == '(') num++;
    if (c == ')') num--;
    if (c == '?') {
      if (n1 > 0)
        c = '(', num++, n1--;
      else
        c = ')', num--;
    }
    if (cnt < n)
      if (num <= 0) return printf(":("), 0;
  }
  cout << s;
}
