import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

    protected static String process(String data) {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    }

    static Matrix multiply(Matrix m1, Matrix m2) {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    }

    static long multiply(Matrix m1, Matrix m2, int row, int col) {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    }

    static void populate(String[] lines, Matrix matrix) {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    }

    static class Matrix {
        long[][] data;
        int cols;

        public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        }

        public void setValue(int row, int col, long value) {
            data[row][col] = value;
        }

        public long getValue(int row, int col) {
            return data[row][col];
        }

        public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        }

        int getCols() {
            return cols;
        }

        int getRows() {
            return data.length;
        }
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

    protected static String process(String data) {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    }

    static Matrix multiply(Matrix m1, Matrix m2) {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    }

    static long multiply(Matrix m1, Matrix m2, int row, int col) {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    }

    static void populate(String[] lines, Matrix matrix) {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    }

    static class Matrix {
        long[][] data;
        int cols;

        public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        }

        public void setValue(int row, int col, long value) {
            data[row][col] = value;
        }

        public long getValue(int row, int col) {
            return data[row][col];
        }

        public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        }

        int getCols() {
            return cols;
        }

        int getRows() {
            return data.length;
        }
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} Main protected static String process(String data) {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    } process {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    } final String[] lines = splitForLines(data); lines splitForLines(data) splitForLines data final int[] split1 = split(lines[0]); split1 split(lines[0]) split lines[0] lines 0 final int n = split1[0]; n split1[0] split1 0 final int m = split1[1]; m split1[1] split1 1 final int l = split1[2]; l split1[2] split1 2 final Matrix matrix1 = new Matrix(n, m); matrix1 new Matrix(n, m) populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1) populate Arrays.copyOfRange(lines, 1, 1 + n) Arrays.copyOfRange Arrays lines 1 1 + n 1 n matrix1 final Matrix matrix2 = new Matrix(m, l); matrix2 new Matrix(m, l) populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2) populate Arrays.copyOfRange(lines, 1 + n, lines.length) Arrays.copyOfRange Arrays lines 1 + n 1 n lines.length lines lines.length matrix2 final Matrix result = multiply(matrix1, matrix2); result multiply(matrix1, matrix2) multiply matrix1 matrix2 return result.toString(); result.toString() result.toString result String data data static Matrix multiply(Matrix m1, Matrix m2) {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    } multiply {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    } Matrix result = new Matrix(m1.getRows(), m2.getCols()); result new Matrix(m1.getRows(), m2.getCols()) for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        } int i = 0; int i = 0; i 0 i < result.getRows() i result.getRows() result.getRows result i++ i++ i {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        } {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        } for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            } int j = 0; int j = 0; j 0 j < result.getCols() j result.getCols() result.getCols result j++ j++ j {
                result.setValue(i, j, multiply(m1, m2, i, j));
            } {
                result.setValue(i, j, multiply(m1, m2, i, j));
            } result.setValue(i, j, multiply(m1, m2, i, j)) result.setValue result i j multiply(m1, m2, i, j) multiply m1 m2 i j return result; result Matrix m1 m1 Matrix m2 m2 static long multiply(Matrix m1, Matrix m2, int row, int col) {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    } multiply {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    } long sum = 0; sum 0 for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        } int i = 0; int i = 0; i 0 i < m1.getCols() i m1.getCols() m1.getCols m1 i++ i++ i {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        } {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        } final long val1 = m1.getValue(row, i); val1 m1.getValue(row, i) m1.getValue m1 row i final long val2 = m2.getValue(i, col); val2 m2.getValue(i, col) m2.getValue m2 i col sum += val1 * val2 sum val1 * val2 val1 val2 return sum; sum Matrix m1 m1 Matrix m2 m2 int row row int col col static void populate(String[] lines, Matrix matrix) {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    } populate {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    } for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        } int row = 0; int row = 0; row 0 row < lines.length row lines.length lines lines.length row++ row++ row {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        } {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        } final int[] data0 = split(lines[row]); data0 split(lines[row]) split lines[row] lines row for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            } int col = 0; int col = 0; col 0 col < data0.length col data0.length data0 data0.length col++ col++ col {
                matrix.setValue(row, col, data0[col]);
            } {
                matrix.setValue(row, col, data0[col]);
            } matrix.setValue(row, col, data0[col]) matrix.setValue matrix row col data0[col] data0 col String[] lines lines Matrix matrix matrix private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    } readAll {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    } InputStreamReader r = null; r null BufferedReader br = null; br null try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        } IOException e {
            throw new RuntimeException(e);
        } throw new RuntimeException(e); new RuntimeException(e) {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        } if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            } br != null br null {
                try {
                    br.close();
                } catch (IOException e) {
                }
            } try {
                    br.close();
                } catch (IOException e) {
                } catch (IOException e) {
                } IOException e {
                } {
                    br.close();
                } br.close() br.close br if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            } r != null r null {
                try {
                    r.close();
                } catch (IOException e) {
                }
            } try {
                    r.close();
                } catch (IOException e) {
                } catch (IOException e) {
                } IOException e {
                } {
                    r.close();
                } r.close() r.close r {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } r = new InputStreamReader(is) r new InputStreamReader(is) br = new BufferedReader(r) br new BufferedReader(r) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String s; s while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            } (s = br.readLine()) != null (s = br.readLine()) s br.readLine() br.readLine br null {
                sb.append(s).append('\n');
            } sb.append(s).append('\n') sb.append(s).append sb.append(s) sb.append sb s '\n' return sb.toString(); sb.toString() sb.toString sb InputStream is is private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    } splitForLines {
        return lines.split("\\n");
    } return lines.split("\\n"); lines.split("\\n") lines.split lines "\\n" String lines lines private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    } split {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    } final String[] s0 = s.split(" "); s0 s.split(" ") s.split s " " int[] ia = new int[s0.length]; ia new int[s0.length] s0.length s0 s0.length for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        } int i = 0; int i = 0; i 0 i < s0.length i s0.length s0 s0.length i++ i++ i {
            ia[i] = Integer.parseInt(s0[i]);
        } {
            ia[i] = Integer.parseInt(s0[i]);
        } ia[i] = Integer.parseInt(s0[i]) ia[i] ia i Integer.parseInt(s0[i]) Integer.parseInt Integer s0[i] s0 i return ia; ia String s s public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    } main {
        System.out.print(process(readAll(System.in)));
    } System.out.print(process(readAll(System.in))) System.out.print System.out System System.out process(readAll(System.in)) process readAll(System.in) readAll System.in System System.in String[] args args static class Matrix {
        long[][] data;
        int cols;

        public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        }

        public void setValue(int row, int col, long value) {
            data[row][col] = value;
        }

        public long getValue(int row, int col) {
            return data[row][col];
        }

        public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        }

        int getCols() {
            return cols;
        }

        int getRows() {
            return data.length;
        }
    } Matrix long[][] data; data int cols; cols public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        } Matrix {
            data = new long[rows][cols];
            this.cols = cols;
        } data = new long[rows][cols] data new long[rows][cols] rows cols this.cols = cols this.cols this this.cols cols int rows rows int cols cols public void setValue(int row, int col, long value) {
            data[row][col] = value;
        } setValue {
            data[row][col] = value;
        } data[row][col] = value data[row][col] data[row] data row col value int row row int col col long value value public long getValue(int row, int col) {
            return data[row][col];
        } getValue {
            return data[row][col];
        } return data[row][col]; data[row][col] data[row] data row col int row row int col col public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        } dumpRow {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            } int i = 0; int i = 0; i 0 i < data[row].length i data[row].length data[row] data row data[row].length i++ i++ i {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            } {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            } final long value = data[row][i]; value data[row][i] data[row] data row i if (i > 0) {
                    sb.append(' ');
                } i > 0 i 0 {
                    sb.append(' ');
                } sb.append(' ') sb.append sb ' ' sb.append(value) sb.append sb value return sb.toString(); sb.toString() sb.toString sb int row row @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        } toString {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            } int i = 0; int i = 0; i 0 i < data.length i data.length data data.length i++ i++ i {
                sb.append(dumpRow(i)).append('\n');
            } {
                sb.append(dumpRow(i)).append('\n');
            } sb.append(dumpRow(i)).append('\n') sb.append(dumpRow(i)).append sb.append(dumpRow(i)) sb.append sb dumpRow(i) dumpRow i '\n' return sb.toString(); sb.toString() sb.toString sb int getCols() {
            return cols;
        } getCols {
            return cols;
        } return cols; cols int getRows() {
            return data.length;
        } getRows {
            return data.length;
        } return data.length; data.length data data.length public class Main {

    protected static String process(String data) {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    }

    static Matrix multiply(Matrix m1, Matrix m2) {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    }

    static long multiply(Matrix m1, Matrix m2, int row, int col) {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    }

    static void populate(String[] lines, Matrix matrix) {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    }

    static class Matrix {
        long[][] data;
        int cols;

        public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        }

        public void setValue(int row, int col, long value) {
            data[row][col] = value;
        }

        public long getValue(int row, int col) {
            return data[row][col];
        }

        public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        }

        int getCols() {
            return cols;
        }

        int getRows() {
            return data.length;
        }
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} public class Main {

    protected static String process(String data) {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    }

    static Matrix multiply(Matrix m1, Matrix m2) {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    }

    static long multiply(Matrix m1, Matrix m2, int row, int col) {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    }

    static void populate(String[] lines, Matrix matrix) {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    }

    static class Matrix {
        long[][] data;
        int cols;

        public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        }

        public void setValue(int row, int col, long value) {
            data[row][col] = value;
        }

        public long getValue(int row, int col) {
            return data[row][col];
        }

        public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        }

        int getCols() {
            return cols;
        }

        int getRows() {
            return data.length;
        }
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

    protected static String process(String data) {
        final String[] lines = splitForLines(data);
        final int[] split1 = split(lines[0]);
        final int n = split1[0];
        final int m = split1[1];
        final int l = split1[2];

        final Matrix matrix1 = new Matrix(n, m);
        populate(Arrays.copyOfRange(lines, 1, 1 + n), matrix1);

        final Matrix matrix2 = new Matrix(m, l);
        populate(Arrays.copyOfRange(lines, 1 + n, lines.length), matrix2);

        final Matrix result = multiply(matrix1, matrix2);

        return result.toString();
    }

    static Matrix multiply(Matrix m1, Matrix m2) {
        Matrix result = new Matrix(m1.getRows(), m2.getCols());

        for (int i = 0; i < result.getRows(); i++) {
            for (int j = 0; j < result.getCols(); j++) {
                result.setValue(i, j, multiply(m1, m2, i, j));
            }
        }

        return result;
    }

    static long multiply(Matrix m1, Matrix m2, int row, int col) {
        long sum = 0;
        for (int i = 0; i < m1.getCols(); i++) {
            final long val1 = m1.getValue(row, i);
            final long val2 = m2.getValue(i, col);
            sum += val1 * val2;
        }
        return sum;
    }

    static void populate(String[] lines, Matrix matrix) {
        for (int row = 0; row < lines.length; row++) {
            final int[] data0 = split(lines[row]);
            for (int col = 0; col < data0.length; col++) {
                matrix.setValue(row, col, data0[col]);
            }
        }
    }

    static class Matrix {
        long[][] data;
        int cols;

        public Matrix(int rows, int cols) {
            data = new long[rows][cols];
            this.cols = cols;
        }

        public void setValue(int row, int col, long value) {
            data[row][col] = value;
        }

        public long getValue(int row, int col) {
            return data[row][col];
        }

        public String dumpRow(int row) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data[row].length; i++) {
                final long value = data[row][i];
                if (i > 0) {
                    sb.append(' ');
                }
                sb.append(value);
            }
            return sb.toString();
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < data.length; i++) {
                sb.append(dumpRow(i)).append('\n');
            }
            return sb.toString();
        }

        int getCols() {
            return cols;
        }

        int getRows() {
            return data.length;
        }
    }

    private static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }

    private static String[] splitForLines(String lines) {
        return lines.split("\\n");
    }

    private static int[] split(String s) {
        final String[] s0 = s.split(" ");
        int[] ia = new int[s0.length];

        for (int i = 0; i < s0.length; i++) {
            ia[i] = Integer.parseInt(s0[i]);
        }

        return ia;
    }

    public static void main(String[] args) {
        System.out.print(process(readAll(System.in)));
    }
}