#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length(), cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'a') cnt++;
  }
  int l = n - cnt;
  int flag = 1;
  l % 2 ? flag = 0 : flag = 1;
  l /= 2;
  if (flag) {
    for (int i = n - 1, j = n - 1 - l; j >= 0;) {
      if (s[j] == 'a')
        j--;
      else {
        if (s[i] == s[j]) {
          i--;
          j--;
        } else {
          flag = 0;
          break;
        }
      }
    }
  }
  if (flag) {
    cout << s.substr(0, n - l);
  } else {
    cout << ":(";
  }
  return 0;
}
