#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n % 2) {
    cout << ":(" << endl;
    return 0;
  }
  string s;
  cin >> s;
  long long t1 = n / 2;
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') {
      cnt++;
    }
  }
  if (cnt > t1) {
    cout << ":(" << endl;
    return 0;
  }
  t1 -= cnt;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '?') {
      if (t1 > 0) {
        s[i] = '(';
        t1--;
      } else {
        s[i] = ')';
      }
    }
  }
  long long cur = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') {
      cur++;
    } else if (s[i] == ')') {
      cur--;
    }
    if (cur < 0) {
      cout << ":(" << endl;
      return 0;
    } else if (i != n - 1 && cur == 0) {
      cout << ":(" << endl;
      return 0;
    } else if (i == n - 1 && cur != 0) {
      cout << ":(" << endl;
      return 0;
    }
  }
  cout << s << endl;
}
