import numpy as np n = int(input()) a = [] for i in range(n): a.append([int(j) for j in input().split()]) b = np.transpose(a) for i in b: print(*i)