class Yukicoder def initialize n = gets.to_i answer = "" while (answer.empty? && n > 25) || n > 26 i = n % 26 n /= 26 answer += (i+10).to_s(36).upcase end if answer.empty? answer += (n+10).to_s(36).upcase else answer += (n+9).to_s(36).upcase end puts answer.reverse end end Yukicoder.new