"use strict";
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
    var a=[];
    var b=[];
    
    let n,m,l;
    [n,m,l]=lines.shift().trim().split(' ').map(Number);
    //console.log("reader n: " + n +", m: "+m+", l: "+l);

    for (var i=0; i<n; i++){
	a.push(lines.shift().trim().split(' ').map(Number));
    }
    //dump(a);
    for (var i=0; i<m; i++){
	b.push(lines.shift().trim().split(' ').map(Number));
    }
    //dump(a);
    
    var c = aux(a,b);

    dump(c);
});

function aux(a,b)
{
    var n=a.length;
    var m=a[0].length;
    var l=b[0].length;
    
    var x=[];
    for (var k=0; k<l; k++){
	x.push(0)
    }
    var c=[];
    for (var i=0; i<n; i++){
	c.push(x.concat())
    }

    var s;
    for (var i=0; i<n; i++) {
	for (var k=0; k<l; k++) {
	    s=0;
	    for (var j=0; j<m; j++) {
		s += a[i][j]*b[j][k];
	    }
	    c[i][k] = s
	    //console.log(i,k,s);
	}
    }

    //dump(c)
    return(c);
}

function dump(a)
{
    var n=a.length
    //console.log("dump n: "+ n+", m: "+a[0].length)
    for (var i=0;i<n; i++){
	console.log(a[i].map(x=>x.toString()).join(' '))
    }
 }
