#P363. 练62.2 矩阵乘法

练62.2 矩阵乘法

Description

Calculate the multiplication of two matrices. When multiplying an n×mn \times m matrix AA by an m×km \times k matrix BB, the resulting matrix CC is of size n×kn \times k, where $C[i][j] = A[i][0] \times B[0][j] + A[i][1] \times B[1][j] + \ldots + A[i][m-1] \times B[m-1][j]$ (C[i][j]C[i][j] represents the element in the ii-th row and jj-th column of matrix CC).

Input Format

First line contains nn, mm, kk, indicating that matrix AA is nn rows by mm columns, and matrix BB is mm rows by kk columns, where nn, mm, kk are all less than 100100.
Then input matrices AA and BB in sequence, where AA is nn rows by mm columns and BB is mm rows by kk columns. The absolute value of each element in the matrices will not exceed 10001000.

Output Format

Output matrix CC, consisting of nn lines, each containing kk integers separated by a single space.

Sample

3 2 3
1 1
1 1
1 1
1 1 1
1 1 1
2 2 2
2 2 2
2 2 2