#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long l = s.size();
  long long a = 0, j = 0;
  for (long long i = l - 1; i >= 0; i--)
    if (s[i] == 'a') {
      j = i;
      break;
    }
  for (long long i = 0; i <= j; i++)
    if (s[i] == 'a') a++;
  long long k = j + 1;
  while (k != (l - k + a) and k < l) k++;
  long long x = k;
  for (long long i = 0; i < k and x < l; i++) {
    if (s[i] != 'a' and s[i] != s[x]) {
      cout << ":(";
      exit(0);
    }
    if (s[i] != 'a') x++;
  }
  if (k == (l - k + a))
    cout << s.substr(0, k);
  else
    cout << ":(";
  return 0;
}
