#include using namespace std; typedef long long ll; string AtoZ; int main() { ll N; cin >> N; list lst; for(char ch='A'; ch<='Z'; ch++){ AtoZ.push_back(ch); } ll cnt=0, mod=26; while(1){ ll x; x = N%mod; lst.push_front(AtoZ[x]); N /= mod; N--; //cout << N <<" "<< x << endl; if(N==-1) break; } for(auto itr=lst.begin(); itr!=lst.end(); itr++){ cout << *itr; } cout << endl; }