import Data.List
import Control.Monad

main = do
  [n,m,l] <- fmap (map read . words) getLine :: IO [Int]
  mat1 <- replicateM n $ fmap (map read . words) getLine :: IO [[Int]]
  mat2 <- replicateM m $ fmap (map read . words) getLine :: IO [[Int]]
  let mat3 = matrixProduct mat1 mat2
  putStr . output $ mat3

matrixProduct mat1 mat2 = map (\v -> vectorMatrixProduct v $ transpose mat2) mat1

vecterProduct v1 v2 = sum $ zipWith (*) v1 v2

vectorMatrixProduct v mat = map (vecterProduct v) mat

output mat = unlines . map unwords . map (map show) $ mat

