C = ('A' .. 'Z').to_a C.unshift(' ') n = gets.to_i result = [] m, r = n.divmod(26) result << C[r + 1] while m > 0 m,r = m.divmod(26) result << C[r] end puts result.reverse.join.strip