Petya studies positional notations. He has already learned to add and subtract numbers in the systems of notations with different radices and has moved on to a more complicated action — multiplication. To multiply large numbers one has to learn the multiplication table. Unfortunately, in the second grade students learn only the multiplication table of decimals (and some students even learn it in the first grade). Help Petya make a multiplication table for numbers in the system of notations with the radix *k*.
The first line contains a single integer *k* (2 ≤ *k* ≤ 10) — the radix of the system.
# Implementing the above algorithm as code

# Reading the value of k
k = int(input())

# Loop for each row
for i in range(1, k):
    # Loop for each column
    for j in range(1, k):
        # Convert the product of i and j to k-notation and print with spaces
        product = i*j
        k_product = ""
        while product > 0:
            k_product = str(product % k) + k_product
            product //= k
        if k_product == "":
            k_product = "0"
        print(k_product, end=" ")
    # Print a new line after each row
    print()
