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

main :: IO ()
main = do
  [n, m, _] <- map read . words <$> getLine
  ma <- replicateM n $ map read . words <$> getLine :: IO [[Int]]
  mb <- replicateM m $ map read . words <$> getLine :: IO [[Int]]
  let mc = ma `matrixMult` mb
  putStr . unlines . map (unwords . map show) $ mc
  where ma `matrixMult` mb = [ [ sum (zipWith (*) va vb) | vb <- transpose mb ] | va <-  ma ]

