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