import scala.io.StdIn.readLine
import scala.collection.mutable.ArrayBuffer

object Main extends App {
  val Array(n,m,l) = readLine.split(" ").map(_.toInt)
  val buf1 = ArrayBuffer.empty[Array[Int]]
  val buf2 = ArrayBuffer.empty[Array[Int]]

  for( i <- 0 until n) buf1 += readLine.split(" ").map(_.toInt)
  for( i <- 0 until m) buf2 += readLine.split(" ").map(_.toInt)

  val m1 = buf1.toArray
  val m2 = buf2.toArray

  val m3 = for(i <- 0 until n) yield for(j<- 0 until l)
    yield (0 until m).foldLeft(0) { (sum,k) => sum + m1(i)(k) * m2(k)(j) }

  m3.foreach(row => println(row.mkString(" ")))
}