n=int(input()) l=[input().split() for _ in [0]*n] b,a=[i for i in zip(*l)] a=[x for x in a if x not in b] print('\n'.join(a))