object Main extends App {
  val scanner = new java.util.Scanner(System.in)

  val n = scanner.nextInt()
  val m = scanner.nextInt()
  val l = scanner.nextInt()

  val A = Array.fill(n, m)(0L)
    .map { _.map(_ => scanner.nextInt()) }

  val B = Array.fill(m, l)(0L)
    .map { _.map(_ => scanner.nextInt()) }

  val C =
    (0 until n).map { i =>
      (0 until l).map { j =>
        (0 until m).foldLeft(0L) { (c, k) =>
          c + A(i)(k) * B(k)(j)
        }
      }
    }

  val outputs = C.map(_.mkString(" "))

  outputs.foreach(println)
}