import Control.Monad
import Control.Applicative
import Data.List
main = do
  [n,m,l]<-map (read::String->Int) . words <$> getLine
  a <-  map (map (read::String->Int) .words) <$> (replicateM n getLine)
  b <-  map (map (read::String->Int) .words) <$> (replicateM m getLine)
  putStr $ unlines $ map (unwords . map show) $ mult a b

mult :: Num a => [[a]] -> [[a]] -> [[a]]
mult a b = [map (sum . zipWith (*) r) $ transpose b | r <- a]