fun main(args: Array<String>) {
    val (n, m, l) = readLine()!!.split(" ").map(String::toInt)

    var aMatrix = MutableList(n) { MutableList(m) {0} }
    var bMatrix = MutableList(m) { MutableList(l) {0} }

    (0 until n).forEach { aMatrix[it] = readLine()!!.split(" ").map(String::toInt).toMutableList() }
    (0 until m).forEach { bMatrix[it] = readLine()!!.split(" ").map(String::toInt).toMutableList() }

    (0 until n).forEach { row ->
        (0 until l).forEach { column ->
            print("${(0 until m).map { aMatrix[row][it].toLong() * bMatrix[it][column].toLong() }.sum()}")
            if (column != l - 1) {print(" ")}
        }
        println()
    }
}

