import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int A[][] = new int[n][m]; A new int[n][m] n m int B[][] = new int[m][l]; B new int[m][l] m l long cnt = 0; cnt 0 int ai = 0 ai 0 bi = 0 bi 0 abj = 0 abj 0 x = 0; x 0 for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        } {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        } for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                int num = sc.nextInt();
                A[i][j] = num;
            } {
                int num = sc.nextInt();
                A[i][j] = num;
            } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc A[i][j] = num A[i][j] A[i] A i j num for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        } {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        } for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            } int j = 0; int j = 0; j 0 j < l j l j++ j++ j {
                int num = sc.nextInt();
                B[i][j] = num;
            } {
                int num = sc.nextInt();
                B[i][j] = num;
            } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc B[i][j] = num B[i][j] B[i] B i j num while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        } x < n * l x n * l n l {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        } cnt += A[ai][abj] * B[abj][bi] cnt A[ai][abj] * B[abj][bi] A[ai][abj] A[ai] A ai abj B[abj][bi] B[abj] B abj bi if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            } abj + 1 == m abj + 1 abj 1 m {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            } System.out.print(cnt) System.out.print System.out System System.out cnt x++ x if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                } x % l != 0 x % l x l 0 {
                    System.out.print(" ");
                } System.out.print(" ") System.out.print System.out System System.out " " {
                    System.out.println("");
                } System.out.println("") System.out.println System.out System System.out "" cnt = 0 cnt 0 abj = 0 abj 0 if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                } bi < l - 1 bi l - 1 l 1 {
                    bi++;
                } bi++ bi {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                } bi = 0 bi 0 if (ai < n - 1) {
                        ai++;
                    } ai < n - 1 ai n - 1 n 1 {
                        ai++;
                    } ai++ ai {
                abj++;
            } abj++ abj String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int l = sc.nextInt();

        int A[][] = new int[n][m];
        int B[][] = new int[m][l];
        long cnt = 0;
        int ai = 0, bi = 0, abj = 0, x = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                int num = sc.nextInt();
                A[i][j] = num;
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < l; j++) {
                int num = sc.nextInt();
                B[i][j] = num;
            }
        }
        while (x < n * l) {
            cnt += A[ai][abj] * B[abj][bi];
            if (abj + 1 == m) {
                System.out.print(cnt);
                x++;
                if (x % l != 0) {
                    System.out.print(" ");
                } else {
                    System.out.println("");
                }
                cnt = 0;
                abj = 0;
                if (bi < l - 1) {
                    bi++;
                } else {
                    bi = 0;
                    if (ai < n - 1) {
                        ai++;
                    }
                }
            }else{
                abj++;
            }
        }
    }
}