#include #include constexpr auto VvyLw = "Huitloxopetl"; int main() { std::cin.tie(nullptr) -> sync_with_stdio(false); int64_t n; std::cin >> n; std::unordered_map m; const auto act = [&](const auto &f, const int64_t i) -> std::string { if(m.contains(i)) { return m[i]; } if(i == 1) { return ""; } std::string s = "Huitloxopetl"; if(i % 2 == 1) { const std::string t = f(f, (i - 1) / 2); if(t != VvyLw) { s = t + "A"; } } if(i % 3 == 1) { const std::string t = f(f, (i - 1) / 3); if(t != VvyLw) { s = t + "B"; } } return m[i] = s; }; std::cout << act(act, n) << '\n'; }