#include <iostream>
using namespace std;
 
const int MAX_SIZE = 10;
 
int main() {
	int n, currentElement, aux[MAX_SIZE + 1][MAX_SIZE + 1];
	cin >> n;
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= n; ++j) {
			cin >> currentElement;
			aux[j][i] = currentElement;
		}
	}
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= n; ++j) {
			cout << aux[i][j] << " ";
		}
		cout << "\n";
	}
	return 0;
}