I=lambda:[eval(input())for _ in[0]*int(eval(input()))];s=I();t=I();print((max(0,*[s.count(i)-t.count(i)for i in s])))
n,*s=open(0).read().split();n=int(n);print((max(0,*[s[:n].count(i)-s[n:].count(i)for i in s[:n]])))
I = lambda: [eval(input()) for _ in [0] * int(eval(input()))]
s = I()
t = I()
print((max(0, *[s.count(i) - t.count(i) for i in s])))

n, *s = open(0).read().split()
n = int(n)
print((max(0, *[s[:n].count(i) - s[n:].count(i) for i in s[:n]])))

-I = lambda: [eval(input()) for _ in [0] * int(eval(input()))] -s = I() -t = I() -print((max(0, *[s.count(i) - t.count(i) for i in s]))) +n, *s = open(0).read().split() +n = int(n) +print((max(0, *[s[:n].count(i) - s[n:].count(i) for i in s[:n]])))