N = int(input())
array = []
for i in range(N):
    array.append(input().split())
for line in (list(map(list, zip(*array)))):
  print(*line)