let content = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', buf => {
  content += buf;
});
process.stdin.on('end', () => {
  const [size, ...lines] = content
    .trim()
    .split('\n')
    .map(line => line.split(' ').map(n => parseInt(n, 10)));
  
  const [n, m, l] = size;
  const matA = lines.slice(0, n);
  const matB = lines.slice(n);
  const result = matMul(matA, matB);
  console.log(result.map(row => row.join(' ')).join('\n'));
});

const matMul = ([fst, ...rest], matB) => {
  if (fst === undefined) {
    return [];
  }

  const invMatB = invert(matB);
  return [
    invMatB.map(
      row => row.reduce((prev, cur, i) => prev + cur * fst[i], 0)
    ),
    ...matMul(rest, matB)
  ];
};

const invert = mat => {
  const inverted = [];
  for (let i = 0; i < mat[0].length; i++) {
    const row = [];
    for (let j = 0; j < mat.length; j++) {
      row.push(mat[j][i]);
    }

    inverted.push(row);
  }

  return inverted;
};

