#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 7;
const long long INF = 1e9;
const long long mod = 1e9 + 7;
string a;
string b;
string T;
map<char, int> mp;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> a;
  b = a;
  for (int i = 0; i < b.size(); i++) {
    if (b[i] != 'a') {
      mp[b[i]]++;
    }
  }
  for (auto i : mp) {
    if (i.second % 2 != 0) {
      cout << ":(";
      return 0;
    }
  }
  for (auto i : mp) {
    mp[i.first] /= 2;
  }
  for (int i = b.size(); i >= 0; i--) {
    if (b[i] == 'a') {
      break;
    }
    if (mp[b[i]]) {
      T += b[i];
      mp[b[i]]--;
    }
  }
  reverse(T.begin(), T.end());
  b = a.substr(0, a.size() - T.size());
  while ((int)b.find('a') != -1) {
    b.erase(b.find('a'), 1);
  }
  if (b == T) {
    cout << a.substr(0, a.size() - T.size());
  } else {
    cout << ":(";
  }
}
