while 1:a=18;x=int(raw_input(),a);print' '.join(chr(z/a+83)+`z%a`for z in(x+ord(e)for e in"8\mkX4#%")if 0