#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, count1 = 0, x, a = 0, count2 = 0, count = 0;
  string s, s1, ans, t;
  cin >> s;
  i = s.length() - 1;
  while (i > 0) {
    if (s[i] != 'a') {
      count2++;
    } else if (s[i] == 'a') {
      j = i;
      break;
    }
    i--;
  }
  i = 0;
  s1 = "";
  while (i < s.length()) {
    if (s[i] != 'a') {
      s1 = s1 + s[i];
      count1++;
    } else if (s[i] == 'a') {
      a++;
    }
    i++;
  }
  count = count1;
  count1 -= count2;
  if (a == s.length()) {
    ans = s;
  } else if (a != s.length() && count2 == 0) {
    ans = ":(";
  } else if (count1 > count2) {
    ans = ":(";
  } else {
    if (count % 2 != 0) {
      ans = ":(";
    } else {
      count = (count / 2);
      x = s.length();
      for (i = 0; i < count; i++) {
        if (s1[i] != s1[count + i]) {
          break;
        }
      }
      if (i >= count) {
        ans.insert(0, s, 0, x - count);
      } else
        ans = ":(";
    }
  }
  cout << ans;
  return 0;
}
