x = 1

while x < 10:
    y = 1
    while y < 10:
        print("%4d" % (x*y), end="")
        y += 1
    print()
    x += 1




x = 1

while x < 10:
    y = 1
    while y < 10:
        print("%4d" % (x*y), end="")
        y += 1
    print()
    x += 1



