#include <iostream>
using namespace std;
/*
Declarăm “n” și cele trei matrice.
Citim variabila “n”.
Folosind doua structuri repetitive intercalate citim prima matrice.
Folosind doua structuri repetitive intercalate:
	Citim elementul curent.
	Facem suma dintre elementul curent situat în prima matrice cu 
	elementul curent citit și o salvăm în cea de-a treia matrice pe aceeasi pozitie.
	Afisam suma calculata.
După închiderea celei de-a doua structuri repetitive, afisam un rand nou.
*/

const int SIZE = 10;

int main() {
	int n, one[SIZE + 1][SIZE + 1], two[SIZE + 1][SIZE + 1], three[SIZE +1][SIZE + 1];
	cin >> n;
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= n; ++j) {
			cin >> one[i][j];
		}
	}
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= n; ++j) {
			cin >> two[i][j];
			three[i][j] = one[i][j] + two[i][j];
			cout << three[i][j] << " ";
		}
		cout << "\n";
	}	
	return 0;
}//