hfirst = 1
wfirst = 1
while hfirst <= 9:
wfirst = 1
while wfirst <= hfirst:
print(str(wfirst)+"*"+str(hfirst)+"="+str(hfirst*wfirst),end=" ")
wfirst+= 1
print()
hfirst+= 1
hfirst = 1
wfirst = 1
while hfirst <= 9:
wfirst = 1
while wfirst <= hfirst:
print(str(wfirst)+"*"+str(hfirst)+"="+str(hfirst*wfirst),end=" ")
wfirst+= 1
print()
hfirst+= 1