#include <bits/stdc++.h>
using namespace std;
int main() {
  string t, s, r, p, k;
  int i, j, c = 0;
  cin >> t;
  i = t.size() - 1;
  while (t[i] != 'a' && i >= 0) {
    r += t[i];
    i--;
  }
  j = i;
  i = 0;
  while (i <= j) {
    if (t[i] != 'a') p += t[i];
    i++;
  }
  reverse(r.begin(), r.end());
  if (p == r) {
    s = t.substr(0, j + 1);
    cout << s << endl;
  } else if (p.size() < r.size()) {
    while (p.size() < r.size()) {
      p += r.at(0);
      r.erase(0, 1);
      c++;
    }
    if (p == r) {
      s = t.substr(0, j + c + 1);
      cout << s << endl;
    } else
      cout << ":(\n";
  } else
    cout << ":(\n";
}
