#include #include #define pr(s) std::cout << s << std::endl using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); long long n; cin >> n; vector c; vector::iterator it = c.begin(); c.insert(it, n % 26 + 'A'); it = c.begin(); n /= 26; int t; while (n) { if ((t = n % 26) == 0) { c.insert(it, 'Z'); } else { c.insert(it, t + 'A' - 1); } it = c.begin(); n /= 26; } if (*it == 'A' && *(it + 1) == 'Z') { ++it; } while (it != c.end()) { cout << *it; ++it; } cout << endl; }