object Main {
  def main(args: Array[String]): Unit = {
    val Array(n, m, l, _*) = io.StdIn.readLine().split(" ").map(_.toInt)
    val a = Array.ofDim[Int](n, m)
    val b = Array.ofDim[Int](m, l)

    for (row <- 0 until n) {
      io.StdIn.readLine().split(" ").map(_.toInt)
        .zipWithIndex
        .foreach { case (v, col) => a(row)(col) = v }
    }
    for (row <- 0 until m) {
      io.StdIn.readLine().split(" ").map(_.toInt)
        .zipWithIndex
        .foreach { case (v, col) => b(row)(col) = v }
    }

    val c = Array.ofDim[Int](n, l)
    for {
      i <- 0 until n
      j <- 0 until l
    } {
      c(i)(j) = (0 until m).foldLeft(0) { case (acc, k) =>
        acc + a(i)(k) * b(k)(j)
      }
    }

    c.map(_.mkString(" ")).foreach(println)
  }
}