manu = int(input())
prashu = list(map(int, input().split()))
for k in prashu:
    if prashu.count(k) == 1:
        print(k)
        break

8c01db167e1ae03d38144a709d911e24f59dc8de
<mask token>

<mask token>
for k in prashu:
    if prashu.count(k) == 1:
        print(k)
        break

manu = int(input())
prashu = list(map(int, input().split()))
for k in prashu:
    if prashu.count(k) == 1:
        print(k)
        break
