while 1:n=input();r='';exec"r=chr(65+n%26)+r;n/=26;"*7;print r