package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func strToInt(str string) int {
v, _ := strconv.Atoi(str)
return v
}
func strArrToIntArr(strs []string) []int {
result := []int{}
for _, str := range strs {
result = append(result, strToInt(str))
}
return result
}
func IntArrToStrArrTo(ints []int) []string {
result := []string{}
for _, i := range ints {
result = append(result, fmt.Sprintf("%v", i))
}
return result
}
func main() {
var x, y, z int
_, _ = fmt.Scan(&x)
_, _ = fmt.Scan(&y)
_, _ = fmt.Scan(&z)
// fmt.Printf("x,y,z: %v,%v,%v\n", x, y, z)
scanner := bufio.NewScanner(os.Stdin)
xArr := [][]int{}
for i := 0; i < x; i++ {
scanner.Scan()
xRow := scanner.Text()
xRowVals := strings.Split(xRow, " ")
if len(xRow) == 0 {
continue
}
if len(xRowVals) != y {
fmt.Printf("len not y, %#v, x,y,z: %v,%v,%v", xRowVals, x, y, z)
return
}
xArr = append(xArr, strArrToIntArr(xRowVals))
}
// fmt.Printf("xArr %#v\n", xArr)
yArr := [][]int{}
for i := 0; i < y; i++ {
scanner.Scan()
row := scanner.Text()
rowVals := strings.Split(row, " ")
if len(rowVals) != z {
fmt.Printf("len not z, %#v, row: %v, x,y,z: %v,%v,%v", rowVals, row, x, y, z)
return
}
yArr = append(yArr, strArrToIntArr(rowVals))
}
// fmt.Printf("yArr %#v\n", yArr)
// c:
cArr := [][]int{}
for xi := 0; xi < x; xi++ {
cRow := []int{}
for zi := 0; zi < z; zi++ {
cXY := 0
for yi := 0; yi < y; yi++ {
cXY += (xArr[xi][yi] * yArr[yi][zi])
}
cRow = append(cRow, cXY)
}
cArr = append(cArr, cRow)
}
for _, cRow := range cArr {
fmt.Println(strings.Join(IntArrToStrArrTo(cRow), " "))
}
}