n = int(input())
m = [[i for i in input().split()] for _ in range(n)]
m = [list(i) for i in zip(*m)]
for i in m:
    print(" ".join(i))