# 단어찾기(해쉬)
import sys
sys.stdin=open("C:\Python-lecture\Python_lecture\section_5\input.txt", "rt")
n=int(input())
p=dict()
for i in range(n):
    word=input()
    p[word]=1
for i in range(n-1):
    word=input()
    p[word]=0
for key, val in p.items():
    if val==1:
        print(key)
        break