import scala.io.StdIn

/**
  * AOJ
  */
object Main {

  def main(args: Array[String]): Unit = {

    val in = StdIn.readLine().split(" ").map(_.toInt)
    val n = in(0)
    val m = in(1)
    val l = in(2)
    val a = readMatrix(n, m)
    val b = readMatrix(m, l)
    val c = getProduct(a,b,n,m,l)
    printOut(c)
  }

  def readMatrix(n:Int,m:Int):Array[Array[Int]] = {
    val matrix = Array.ofDim[Int](n, m)
    for(i <- 0 until n){
      matrix(i) = StdIn.readLine().split(" ").map(_.toInt)
    }
    matrix
  }

  def getProduct(a:Array[Array[Int]], b:Array[Array[Int]],n:Int,m:Int,l:Int):Array[Array[Int]] = {
    val matrix = Array.ofDim[Int](n, l)
    for(i <- 0 until n; j <- 0 until l; k <- 0 until m){
      matrix(i)(j) += a(i)(k) * b(k)(j)
    }
    matrix
  }

  def printOut(c:Array[Array[Int]]): Unit ={
    for(e <- c){
      println(e.mkString(" "))
    }
  }
}