import scala.io.StdIn.readLine

object Main extends App {

  val Array(n, m, _) = readLine().split(" ").map { _.toInt }

  val xss = Array.fill(n) { readLine().split(" ").map { _.toDouble } }
  val yss = Array.fill(m) { readLine().split(" ").map { _.toDouble } }
  val zss = ikj(xss, yss)
  for {
    zs <- zss
    ans = zs.map { _.longValue }.mkString(" ")
  } {
    println(ans)
  }

  def ikj(a1: Array[Array[Double]], a2: Array[Array[Double]]): Array[Array[Double]] = {
    val row = a1.length
    val col = a2(0).length
    val res = Array.ofDim[Double](row, col)
    for {
      i <- 0 until row
      k <- a2.indices
      j <- 0 until col
    } {
      res(i)(j) += a1(i)(k) * a2(k)(j)
    }

    res
  }
}

