import re while 1:r=re.sub(' \W+',lambda m:r[m.start():int(`m.end()`,36)],raw_input());print r