let split = Str.split (Str.regexp_string " ");;
let rec readMtx mtx = function
    0 -> Array.of_list (List.rev mtx)
  | i -> let a = read_line () |> split |> List.map int_of_string |> Array.of_list
         in readMtx (a::mtx) (i-1);;

let () =
  let (n,m,l) = Scanf.scanf "%d %d %d\n" (fun n m l->(n,m,l)) in
  let nm = readMtx [] n and
      ml = readMtx [] m and
      nl = Array.init n (fun x -> (Array.init l (fun y->0))) in
  for i = 0 to n-1 do
    for j = 0 to l-1 do
      for k = 0 to m-1 do
        nl.(i).(j) <- nl.(i).(j) + (nm.(i).(k) * ml.(k).(j))
      done
    done
  done;
  Array.iter (fun x ->
      Array.fold_left (fun x y -> x^" "^(string_of_int y)) "" x|> String.trim |> print_endline) nl;;