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.
# Read the radix input
k = int(input())

# Generate the multiplication table for the given radix
for i in range(1, k):
    row = []
    for j in range(1, k):
        # Perform multiplication and convert the result to base k
        product = i * j
        product_in_base_k = ''
        while product > 0:
            digit = product % k
            product_in_base_k = str(digit) + product_in_base_k
            product //= k
        row.append(product_in_base_k)
    # Print the row with space-separated elements
    print(' '.join(row))