#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string R;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != 'a') R.push_back(s[i]);
  }
  if (R.size() == 0) {
    cout << s << endl;
    return 0;
  }
  int flag = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == 'a') break;
    flag = 1;
  }
  if (flag == 0) {
    printf(":(\n");
    return 0;
  }
  char ch = R[0];
  int j = -1;
  int res = -1;
  for (int i = 1; i < R.size(); i++) {
    if (R[i] == ch && i == (R.size() - i)) {
      j = i;
      res = j;
      break;
    }
  }
  if (j == -1) {
    printf(":(\n");
    return 0;
  }
  int i = 0;
  while (i < res) {
    if (R[i] != R[j]) {
      break;
    }
    i++;
    j++;
  }
  if (i < res) {
    printf(":(\n");
  } else {
    string RR;
    int cnt = 0;
    int flag = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == 'a') {
        if (flag == 1) {
          printf(":(\n");
          return 0;
        }
        RR.push_back(s[i]);
      } else {
        if (cnt < res) {
          RR.push_back(s[i]);
          cnt++;
        } else if (cnt == res) {
          flag = 1;
        }
      }
    }
    cout << RR << endl;
  }
  return 0;
}
