#include using namespace std; typedef long long ll; /* A -> 1 B -> 2 ... Z -> 26 AA -> 27 = (26 * A + A) AB -> 28 = (26 * A + B) ... AZ -> 52 = (26 * A + Z) BA -> 53 = (26 * B + A) ... ZZ -> 702 = (26 * Z + Z) AAA -> 703 = (26^2 * A + 26 * A + A) */ int main(){ ll N; cin >> N; ++N; string res = ""; while(N > 0){ --N; res += char(N % 26 + 'A'); N /= 26; } cout << string(res.rbegin(), res.rend()) << endl; return 0; }