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