import scala.io.StdIn

object Main extends App {

  val Array(n, m, l) = StdIn.readLine().split(' ').map(_.toInt)
  val a = Array.fill(n, m)(0) 
  val b = Array.fill(m, l)(0)
  val result = Array.fill(n, l)(0)
  
  (0 until n).foreach{ i =>
    a(i) = StdIn.readLine().split(' ').map(_.toInt)
  }
  (0 until m).foreach{ i =>
    b(i) = StdIn.readLine().split(' ').map(_.toInt)
  }

  (0 until n).foreach{ i =>
    (0 until l).foreach{ j =>
      result(i)(j) = (0 until m).foldLeft(0){ (acc, k) =>
        acc + a(i)(k)*b(k)(j)
      }
    }
  }

  (0 until n).foreach { i =>
    println(result(i).mkString(" "))
  }
}
