import Control.Applicative
import Control.Monad
import Data.List

type Mat = [Vec]
type Vec = [Int]

main :: IO ()
main = do
    [n,m,_] <- readVec
    a <- replicateM n readVec
    b <- replicateM m readVec
    putStr . unlines . map (unwords . map show) $ prodMM a b

readVec :: IO Vec
readVec = map read . words <$> getLine

prodMM :: Mat -> Mat -> Mat
prodMM a b = map (`prodVM` b) a

prodVM :: Vec -> Mat -> Vec
prodVM v m = map (`prodVV` v) (transpose m)

prodVV :: Vec -> Vec -> Int
prodVV u v = sum $ zipWith (*) u v
