#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = int((s).size()), as = count((s).begin(), (s).end(), 'a'),
      other = n - as;
  if (other % 2 != 0)
    cout << ":(\n";
  else {
    int mxpos_a = -1, mxpos_o = -1;
    int o = 0;
    for (int x = (0), qwerty = (n); x < qwerty; x++) {
      if (s[x] == 'a')
        mxpos_a = x;
      else {
        if (o < other / 2) mxpos_o = x;
        o++;
      }
    }
    string t[2] = {};
    for (int x = (0), qwerty = (n); x < qwerty; x++) {
      if (x <= max(mxpos_a, mxpos_o))
        t[0] += s[x];
      else
        t[1] += s[x];
    }
    string p = "";
    for (int x = (0), qwerty = (int((t[0]).size())); x < qwerty; x++)
      if (t[0][x] != 'a') p += t[0][x];
    cout << (p == t[1] ? t[0] : ":(") << "\n";
  }
}
