import Data.List
main = do
  s <- getLine 
  let [n,m,l] = map read . words $ s ::[Int]
  ss <- getContents
  let vv = map (map (read::String->Int) . words) . lines $ ss
  let a = take n vv
  let b = drop n vv
  mapM_  putStrLn $ map (unwords . map show) $  mmul a b

mmul :: [[Int]] -> [[Int]] -> [[Int]]
mmul a b = transpose (map (\y-> map (\x -> ip x y) a) b')
  where b' = transpose b
        ip::[Int] -> [Int] -> Int  
        ip a b = sum $ (zipWith (*) a b)