#include <bits/stdc++.h>
using namespace std;
using pss = pair<string, string>;
using pll = pair<long long, long long>;
const long long mod = 1 * 1e9 + 1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long i, j, k, t, m, n;
  string s;
  cin >> s;
  n = s.length();
  string ans = "";
  for (i = 0; i < n; i++) {
    if (s[i] != 'a') ans += s[i];
  }
  long long l = ans.length();
  if (l % 2) {
    cout << ":(\n";
    return 0;
  }
  ans = ans.substr(0, l / 2);
  i = l / 2 - 1;
  j = n - 1;
  while (i >= 0) {
    if (s[j] != ans[i]) {
      cout << ":(\n";
      return 0;
    }
    i--;
    j--;
  }
  n -= l / 2;
  for (i = 0; i < n; i++) cout << s[i];
  cout << '\n';
  ;
  return 0;
}
