"""
Recommended Python Style Guide:
https://peps.python.org/pep-0008/#introduction
"""

"""
Note (some advanced concepts for the curious):
Getting two values from the one call to input function
can be done using the following neat line:
variable1, variable2 = [int(x) for x in input("Enter two numbers here: ").split()]
Try it out.
"""
n = int(input("Enter n: "))
m = int(input("Enter m: "))

if n > 0 and m > 0:
    # Initialize the result
    r = 1

    # Perform all multiplications except the last, and print
    for i in range(1, m):
        r *= n
        print(f"{n} * ", end="")

    # Perform the last multiplication and print
    r *= n
    print(f"{n} = {r}")
