p=2 exec"b=2\nwhile p/b:\n s='';a=p\n while a:s=chr(a%b+48+(a%b>9)*39)+s;a/=b\n print s,;b+=1\nprint;p+=1;"*62