s = set() for _ in range(int(input())): for i in input().split(): s.add(i) print(*s, sep="\n")