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