object Main extends App {
	override def main(args: Array[String]){
		val sc = new java.util.Scanner(System.in)
		
		val n = sc.nextInt
		val m = sc.nextInt
		val l = sc.nextInt
		
		val m1 = new Matrix(n,m);
		for(i <- (0 until n) ; j <- (0 until m)){
			m1(i,j) = sc.nextInt
		}

		val m2 = new Matrix(m,l);
		for(i <- (0 until m) ; j <- (0 until l)){
			m2(i,j) = sc.nextInt
		}
		
		val res = m1.product(m2)
		
		for(i <- (0 until n); j<- (0 until l)){
			print(res(i,j))
			j match{
				case x:Int if x == l-1 => println
				case _ => print(" ")
			}
		}
		
	}
	
}

class Matrix(val h: Int , val w :Int){
	val matrix = Array.ofDim[Long](h,w)
	
	def update(i:Int , j:Int , newValue:Long):Unit = {
		matrix(i)(j) = newValue
	}
	def apply(i:Int,j:Int): Long = matrix(i)(j)
	
	def product(right:Matrix):Matrix = {
		val ret = new Matrix(h , right.w)
		for(i <- (0 until h) ; j <- (0 until w) ; k <- (0 until right.w)){
			ret(i,k) = ret(i,k) + apply(i,j) * right(j,k)
		}
		
		ret
	}
}