{-# LANGUAGE FlexibleContexts, BangPatterns #-}

module Main where

import Data.Char
import Data.List
import Control.Monad
import Control.Monad.ST
import Control.Monad.State.Strict
import Data.Array.IO
import Data.Array.Unboxed
import Control.Applicative
import Text.Printf
import Debug.Trace


readInt :: IO Int
readInt = read <$> (input `seq` input)
    where input = do
            !c <- getChar
            if isDigit c || c == '-'
                then (c :) <$> input
                else return []

prints :: Show a => [a] -> IO ()
prints as = putStrLn $ concat $ intersperse " " $ map show as

mul [] [] = 0
mul (a:as) (b:bs) = (a*b) + mul as bs

mulmat :: [[Int]] -> [[Int]] -> [[Int]]
mulmat [] _ = []
mulmat a b = let b' = transpose b
             in map (\a0 -> map (mul a0) b') a

main = do
    [n,m,l] <- replicateM 3 readInt
    a <- replicateM n $ replicateM m readInt
    b <- replicateM m $ replicateM l readInt
    mapM_ prints $ mulmat a b
