import Data.Functor( (<$>))
import Control.Monad( replicateM)
import Data.List( transpose)

main = do
    let
	readLine = (read <$>) . words <$> getLine

    [n,m,l] <- readLine
    matrixA <- replicateM n readLine
    matrixB <- replicateM m readLine
    let
	rowXcolumn row transCol = sum $ zipWith (*) row transCol

	rowCalc rowA = (rowXcolumn rowA) <$> (transpose matrixB)

	matrixC = rowCalc <$> matrixA

	printListLn list = do
		putStr . unwords $ show <$> list
		putStrLn ""

    printListLn `mapM_` matrixC

