import scala.io.StdIn

object Main extends App {

  val Array(n, m, l) = StdIn.readLine().split(' ').map(_.toInt)
  //http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2415390#1  
  //  val a = Array.fill(n, m)(0)
  //  val b = Array.fill(m, l)(0)
  //  val result = Array.fill(n, l)(0L)
  val a: Array[Array[Int]] = Array.ofDim[Int](n, m)
  val b: Array[Array[Int]] = Array.ofDim[Int](m, l)
  val result: Array[Array[Long]] = Array.ofDim[Long](n, l)
  
  (0 until n).foreach{ i =>
    a(i) = StdIn.readLine().split(' ').map(_.toInt)
  }
  (0 until m).foreach{ i =>
    b(i) = StdIn.readLine().split(' ').map(_.toInt)
  }

  val rout = (0 until n).map{ i =>
    (0 until l).foreach{ j =>
      result(i)(j) = (0 until m).foldLeft(0L){ (acc, k) =>
        acc + a(i)(k)*b(k)(j)
      }
    }
    result(i).mkString(" ")
  }.mkString(f"%n")

  println(rout)
}
