#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
string s, t;
int main() {
  cin >> s;
  string s2;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] != 'a') s2 += s[i];
  }
  bool f = 1;
  if (s2.length() % 2) f = 0;
  for (int i = 0; i < s2.length() / 2; i++) {
    if (s2[i] != s2[s2.length() / 2 + i]) f = 0;
  }
  for (int i = 0; i < s2.length() / 2; i++) {
    if (s[s.length() - 1 - i] == 'a') f = 0;
  }
  if (!f)
    cout << ":(" << endl;
  else {
    for (int i = 0; i < s.length() - s2.length() / 2; i++) cout << s[i];
  }
}
