#include <bits/stdc++.h>
using namespace std;
long long h[100001], mod = 1e9 + 123, p = 59;
int main() {
  string st;
  cin >> st;
  int n = st.size();
  long long now = 1;
  for (int i = 0; i < n; i++) {
    h[i + 1] = (h[i] + st[i] * now) % mod;
    now = (now * p) % mod;
  }
  now = 1;
  long long x = 0, q = 1, y;
  for (int i = 0; i < n; i++) {
    if (st[i] != 'a') {
      x = (x + st[i] * now) % mod;
      now = (now * p) % mod;
    }
    y = (h[n] - h[i + 1] + mod) % mod;
    q = (q * p) % mod;
    if ((q * x) % mod == y) {
      for (int j = 0; j <= i; j++) cout << st[j];
      return 0;
    }
  }
  cout << ":(";
}
