n=gets.to_i;s="" 999.times{|i| s=(((n-i)%26)+10).to_s(36).upcase+s break if n<26 n=n/26 } puts s