import java.util.*; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); while(in.hasNext()){ int m = in.nextInt(); int n = in.nextInt(); int k = in.nextInt(); int[][] m1 = new int[m][n]; int[][] m2 = new int[n][k]; for (int i = 0; i < m; i++){ for (int j = 0; j < n; j++){ m1[i][j] = in.nextInt(); } } for (int i = 0; i < n; i++){ for (int j = 0; j < k; j++){ m2[i][j] = in.nextInt(); } } int[][] res = mult(m1, m2, m, n, k); //System.out.println(res.length); //System.out.println(res[0].length); for (int i = 0; i < m; i++){ String s = ""; for (int j = 0; j < k; j++){ //System.out.println(j); s += res[i][j]; s += " "; } System.out.println(s); } } } private static int[][] mult(int[][] m1, int[][] m2, int m, int n, int k){ int[][] res = new int[m][k]; for (int i = 0; i < m; i++){ for (int j = 0; j < k; j++){ res[i][j] = helper(m1, m2, i, j, n); } } return res; } private static int helper(int[][] m1, int[][] m2, int i, int j, int n){ int res = 0; for (int p = 0; p < n; p++){ res += m1[i][p] * m2[p][j]; } return res; } }