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

main = do
    [n, m, l] <- map read . words <$> getLine
    a <- replicateM n $ map read . words <$> getLine
    b <- transpose . map (map read . words) <$> replicateM m getLine
    mapM_ putStrLn [unwords [show . foldr1 (+) . map (uncurry (*)) $ zip u v  | v <- b] | u <- a]