#include using namespace std; int main(){ long long N,t,cnt=1; stack st; cin >> N; t=1;N++; while(N-t*26>0) t*=26,N-=t,cnt++; N--; while(cnt>0){ st.push('A'+(N%26)); N/=26;cnt--; } while(!st.empty()) cout << st.top(),st.pop(); cout << endl; return 0; }