#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; int n=s.size(); int counter=1; rep(i,n){ if (s[i]=='a') counter++; } string ans =""; rep(i,counter) ans+="a"; cout << ans << endl; }