m=input();b=2;exec"n=m;s=''\nwhile n:s=chr(48+39*(n%b>9)+n%b)+s;n/=b\nprint s;b+=1;"*35