#include <iostream>
using namespace std;
int main(void)
{
int n, m, k;
int a[101][101], b[101][101], r[101][101] = { 0, };
//행렬 a입력
cin >> n >> m;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
cin >> a[i][j];
//행렬 b입력
cin >> m >> k;
for (int i = 0; i < m; i++)
for (int j = 0; j < k; j++)
cin >> b[i][j];
//행렬의 곱 실행
for (int i = 0; i < n; i++)
for (int j = 0; j < k; j++)
for (int u = 0; u < m; u++)
r[i][j] += a[i][u] * b[u][j];
//출력
for (int i = 0; i < n; i++)
{
for (int j = 0; j < k; j++)
cout << r[i][j] << " ";
cout << endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKHZvaWQpCnsKCWludCBuLCBtLCBrOwoJaW50IGFbMTAxXVsxMDFdLCBiWzEwMV1bMTAxXSwgclsxMDFdWzEwMV0gPSB7IDAsIH07CgoJLy/tlonroKwgYeyeheugpQoJY2luID4+IG4gPj4gbTsKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQoJCWZvciAoaW50IGogPSAwOyBqIDwgbTsgaisrKQoJCQljaW4gPj4gYVtpXVtqXTsKCgkvL+2WieugrCBi7J6F66ClCgljaW4gPj4gbSA+PiBrOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBtOyBpKyspCgkJZm9yIChpbnQgaiA9IDA7IGogPCBrOyBqKyspCgkJCWNpbiA+PiBiW2ldW2pdOwoKCS8v7ZaJ66Cs7J2YIOqzsSDsi6TtlokKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQoJCWZvciAoaW50IGogPSAwOyBqIDwgazsgaisrKQoJCQlmb3IgKGludCB1ID0gMDsgdSA8IG07IHUrKykKCQkJCXJbaV1bal0gKz0gYVtpXVt1XSAqIGJbdV1bal07CgoJLy/stpzroKUKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQoJewoJCWZvciAoaW50IGogPSAwOyBqIDwgazsgaisrKQoJCQljb3V0IDw8IHJbaV1bal0gPDwgIiAiOwoJCWNvdXQgPDwgZW5kbDsKCX0KfQo=