object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, m, l = sc.nextInt()
  val A = new Matrix(n, m, List.fill(n, m)(sc.nextInt()))
  val B = new Matrix(m, l, List.fill(m, l)(sc.nextInt()))
  A.printDotProduct(B)

  class Matrix(rs: Int, cs: Int, d: List[List[Int]]) {
    val rowSize = rs
    val colSize = cs
    val data = d
    val colList: List[List[Int]] = (for (i <- 0 to colSize - 1) yield data.map(e => e(i))).toList

    def printDotProduct(o: Matrix): Unit = {
      for (i <- 0 to rowSize - 1) {
        var result = List.empty[Long]
        for (j <- 0 to o.colList.size - 1) {
          result = calcElement(data(i), o.colList(j)) :: result
        }
        println(result.reverse.mkString(" "))
      }

      def calcElement(ownRow: List[Int], objCol: List[Int]): Long = ownRow.zip(objCol).map(e => e._1.toLong * e._2.toLong).sum
    }
  }
}