#include #include #include #include #include #define REP(i,a,b) for(i=a;i 0) { if(n&1) res = res * x; x = x * x; n >>= 1; } return res; } int main(void) { int i,j,k,l; int test = 1; ull n; ull tmp; ull cnt = 1; cin >> n; tmp = n; while(tmp >= 26) { if(cnt != 1 && tmp == 26) break; tmp /= 26; cnt++; } if(n >= 26) { printf("%c",'A'-1+n/pow((ull)26,cnt-1)); n -= n/pow((ull)26,cnt-1)*pow((ull)26,cnt-1); cnt--; } while(cnt > 1) { printf("%c",'A'-1+n/pow((ull)26,cnt-1)); n -= n/pow((ull)26,cnt-1)*pow((ull)26,cnt-1); cnt--; } printf("%c",'A'+n/pow((ull)26,cnt-1)); puts(""); return 0; }