n = int(input()) a = list(input().split()) b = list(input().split()) for i in range(n-1): if a.count(b[i]) == 1: a.remove(b[i]) print(''.join(a))