for i in range(1,10):
for j in range(i,10):
print('%s*%s=%s'%(i,j,i*j),end="\t")
print("\r")
for i in range(9,-1,-1):
for j in range(i,9):
print('%s*%s=%s'%(i+1,j+1,(i+1)*(j+1)),end="\t")
print("\r")
for i in range(0,10):
for j in range(9,i,-1):
print('%s*%s=%s'%(i+1,j,(i+1)*j),end="\t")
print("\r")
for i in range(9,-1,-1):
for j in range(9,i,-1):
print('%s*%s=%s'%(i+1,j,(i+1)*j),end="\t")
print("\r")