P8723 [Lanqiao Cup 2020 NOI Qualifier AB3] Multiplication Table

Description

The $9 \times 9$ multiplication table is something you must learn when studying multiplication. Under different bases, you need different multiplication tables. For example, the multiplication table in base $4$ is as follows: ``` 1*1=1 2*1=2 2*2=10 3*1=3 3*2=12 3*3=21 ``` Note that the order of the two numbers being multiplied in the table must be the same as in the sample, and you cannot swap the two factors freely. Given $P$, output the multiplication table in base $P$.

Input Format

Input one integer $P$.

Output Format

Output the multiplication table in base $P$. Digits in base $P$ that are greater than or equal to $10$ are represented by uppercase letters `A`, `B`, `C`, $\cdots$.

Explanation/Hint

For all testdata, $2 \leq P \leq 36$. Lanqiao Cup 2020, Round 3 Provincial Contest, Group AB, Problem G. Translated by ChatGPT 5