#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  int j = 0, k = 0;
  int b = 0, c = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == 'a') {
      b++;
    };
  };
  if ((n - b) % 2 != 0) {
    cout << ":(";
    return 0;
  };
  j = (n - b) / 2;
  k = n - j;
  int l;
  for (l = 0; l <= n - j - 1; l++) {
    if (s[l] != 'a') {
      if (s[l] != s[k]) {
        cout << ":(";
        return 0;
      } else {
        k++;
      };
    };
  };
  if ((l != n - j) || (k != n)) {
    cout << ":(";
    return 0;
  } else {
    for (int h = 0; h < n - j; h++) {
      cout << s[h];
    };
  };
  return 0;
};
