for i in range(1,13): r='' for j in range(1,13):r+= j==1 and str(i*j).rjust(3) or str(i*j).rjust(4) print r