n = gets.to_i r = 1 (n -= 26**r; r += 1) while n >= 26**r puts (0...r).reverse_each.map{|r| 65 + (n/26**r)%26 }.map(&:chr)*''