main = do
    snml <- getLine
    ss <- getContents
    let nums = map (\x -> read x :: Int) $ words snml
    let (n,m,l) = (nums!!0, nums!!1, nums!!2)
    let ns = map (map (\x -> read x :: Int)) $ map words $ lines ss
    let (ma, mb) = (take n ns, drop n ns)
    let mc = matrixC ma mb n m l
    mapM_ putStrLn $ map unwords $ map (map show) mc


matrixC ma mb n m l = map (\i -> [(formula ma mb i j m) | j<-[0..l-1]]) [0..n-1]

formula ma mb i j m = sum $ map (\k -> (ma!!i!!k) * (mb!!k!!j)) [0..m-1]

