#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; vector> encoded; void encode(string &S){ long long l = 0, r, N=S.size(); while(l != N){ r = l+1; while(r> S; encode(S); int mx=0; for (auto [x, y] : encoded) if (x == 'a') mx = max(mx, (int)y); cout << string(mx+1, 'a') << endl; return 0; }