#include <bits/stdc++.h>   using namespace std;   int bef[100050];   int main() {     string s, s1;     cin >> s;     int len = s.size();     int last_a = -1;     int now = 0;     for (int i = 0; i < len; i++) {       if (s[i] !=  a ) {         s1 += s[i];         bef[now] = i;         now++;       } else {         last_a = i;       }     }     if (now % 2 == 1)       cout <<  :(  << endl;     else {       for (int i = 0; i < now / 2; i++) {         if (s1[i] != s1[i + now / 2]) {           cout <<  :(  << endl;           return 0;         }       }       if (last_a == -1 || bef[now / 2] > last_a || now == 0) {         for (int i = 0; i < (now != 0 ? bef[now / 2] : len); i++) {           cout << s[i];         }         cout << endl;       } else {         cout <<  :(  << endl;       }     }     return 0;   }   