n = int(input())
matrix = list(map(list, zip(*[input().split() for i in range(n)])))
for i in range(n):
    print(*matrix[i])