n = gets.to_i c = ('A'..'Z').to_a s = c[n % 26] n /= 26 while 0 < n if n <= 26 s = c[n - 1] + s break end s = c[n % 26 - 1] + s n /= 26 end puts s