#include <iostream>
using namespace std;

const int MAX_SIZE = 10;

int main() {
    int size, currentEl, sumMt[MAX_SIZE + 1][MAX_SIZE + 1];
    cin >> size;
    for (int line = 1; line <= size; ++line) {
        for (int col = 1; col <= size; ++col) {
            cin >> currentEl;
            sumMt[line][col] = currentEl;
        }
    }
    for (int line = 1; line <= size; ++line) {
        for (int col = 1; col <= size; ++col) {
            cin >> currentEl;
            cout << (sumMt[line][col] += currentEl) << " ";
        }
        cout << "\n";
    }
    return 0;
}