import Control.Applicative
import Control.Monad
import Data.Array
import Data.Array.ST
import Data.List
import qualified Data.Map as M
import qualified Data.Set as S
import Text.Printf

readInts :: IO [Int]
readInts = map read . words <$> getLine

main :: IO ()
main = do
  [n,m,l] <- readInts
  a <- listArray ((1,1),(n,m)) . join <$> replicateM n readInts
  b <- listArray ((1,1),(m,l)) . join <$> replicateM m readInts
  let c = runSTArray $ do 
      ary <- newArray ((1,1),(n,l)) 0
      forM_ ((,) <$> [1..n] <*> [1..l]) $ \(i, j) -> do
        writeArray ary (i,j) $ sum [ a ! (i,k) * b ! (k,j) | k <- [1..m] ]
      return ary 
  forM_ [1..n] $ \i -> do
    forM_ [1..l] $ \j -> do
      printf "%d" $ c ! (i, j)
      if j == l then putChar '\n' else putChar ' '

