program main
    use iso_fortran_env
    implicit none

    integer(int64) :: n, m
    character(:),allocatable :: txt
    character(26) :: alp

    alp = "abcdefghijklmnopqrstuvwxyz"

    read(*,*) n
    txt = ""

    do
        if (n <= 0) exit
        m = mod(n-1, 26)
        n = (n-1)/26
        txt = alp(m+1:m+1)//txt
    enddo

    print'(a)', trim(txt)

end program main