program main
    use iso_fortran_env
    implicit none

    integer(int64) :: n
    integer(int64) :: i, m, k, left, right
    character(1),allocatable :: name(:)
    character(26) :: alp
    alp = "zabcdefghijklmnopqrstuvwxy"

    read(*,*) n

    i = 0
    left = 0
    right = 0

    do
        left = left + (26**(i) * 1)
        right = right + (26**(i) * 26)
        if ( (left <= n).and.(n <= right) ) then
            exit
        endif
        i = i + 1
!        print *, i, left, right
    enddo
    allocate(name(0:i))

    do k = 0, i
        m = mod(n, 26)
        name( i - k ) = alp(m+1:m+1)
        n = int( (n-1) / 26)
    enddo
    print *, name

end program main