#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int dx4[] = {-1, 0, 1, 0};
const int dy4[] = {0, 1, 0, -1};
const int dx8[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};
const int dxk[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dyk[] = {-1, 1, -2, 2, -2, 2, -1, 1};
inline long long Int() {
  long long inputNumber = 0;
  char c = getchar_unlocked();
  bool sign = true;
  while (!((c >= '0' && c <= '9') || c == '-')) c = getchar_unlocked();
  if (c == '-') sign = false, c = getchar_unlocked();
  while (c >= '0' && c <= '9')
    inputNumber = (inputNumber << 1) + (inputNumber << 3) + c - '0',
    c = getchar_unlocked();
  return sign ? inputNumber : -inputNumber;
}
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& Pair) {
  out << '{' << Pair.first << ", " << Pair.second << '}';
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& Vector) {
  out << '[';
  for (int i = 0; i < (int)Vector.size(); ++i) {
    out << Vector[i];
    if (i + 1 < (int)Vector.size()) out << ", ";
  }
  out << ']';
  return out;
}
template <class S, class T>
ostream& operator<<(ostream& out, const map<S, T>& Map) {
  out << "[\n";
  for (const auto& x : Map) {
    out << "{ Key: " << x.first << " , Value: " << x.second << " }\n";
  }
  out << "]\n";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const multiset<T>& Set) {
  out << '{';
  for (auto it = Set.begin(); it != Set.end();) {
    out << *it;
    it++;
    if (it != Set.end()) out << ", ";
  }
  out << '}';
  return out;
}
void solve();
int main() { solve(); }
const double eps = 1e-10;
const int mod = 1e9 + 7;
const int N = 2e5 + 5;
void solve() {
  string s;
  cin >> s;
  int len = ((int)(s).size());
  string sd = "";
  string org = "";
  int br = -1;
  for (int i = len - 1; i >= 0; --i) {
    if (s[i] != 'a') {
      sd += s[i];
    } else {
      br = i;
      break;
    }
  }
  if (sd == "") {
    bool ok = true;
    for (int i = 0; i < (((int)(s).size())); ++i) {
      if (s[i] != 'a') {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << s;
    } else {
      puts(":(");
    }
    return;
  }
  reverse((sd).begin(), (sd).end());
  for (int i = 0; i <= br; ++i) {
    org += s[i];
  }
  string strip = "";
  for (int i = 0; i < (((int)(org).size())); ++i)
    if (org[i] != 'a') strip += org[i];
  if (strip == sd) {
    cout << org;
    return;
  }
  string tot = strip + sd;
  if (((int)(tot).size()) % 2) {
    puts(":(");
    return;
  }
  int mid = ((int)(tot).size()) / 2;
  string a = tot.substr(0, mid);
  string b = tot.substr(mid);
  if (a != b) {
    puts(":(");
    return;
  }
  reverse((s).begin(), (s).end());
  reverse((a).begin(), (a).end());
  if (s.substr(0, mid) == a) {
    reverse((s).begin(), (s).end());
    int len = ((int)(s).size()) - mid;
    for (int i = 0; i < (len); ++i) putchar(s[i]);
    return;
  }
  puts(":(");
}
