n = int(input()) array = numpy.array([input().strip().split() for _ in range(n)], int) for i in array.transpose(): print(*i,sep=' ', end='\n')