#define _CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
const int N = 510, mod = 1e9 + 7;
long long a[N][N], b[N][N], c[N][N];
int n, p, m;
int main()
{
scanf("%d %d %d", &n, &p, &m);
for (int i = 0; i < n; i++)
for (int j = 0; j < p; j++)
{
scanf("%lld", &a[i][j]);
// a[i][j] = (a[i][j] + mod) % mod;
}
for (int i = 0; i < p; i++)
for (int j = 0; j < m; j++) {
scanf("%lld", &b[i][j]);
// b[i][j] = (b[i][j] + mod) % mod;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
{
for (int k = 0; k < p; k++)
//c[i][j] = (long long)(1ll * c[i][j] + 1ll * a[i][k] * b[k][j] % mod) % mod;
c[i][j] = ( c[i][j] + a[i][k] * b[k][j] ) % mod;
if (c[i][j] <0 ) c[i][j] += mod;
printf("%lld ", c[i][j]);
}
printf("\n");
}
return 0;
}
11-21
644
06-24
2623