n=[eval(input()) for _ in range(int(eval(input())))]

m=[eval(input()) for _ in range(int(eval(input())))]

l=list(set(n))

print((max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l))))))

ans = {}

n = int(eval(input()))

for _ in range(n):

    s = eval(input())

    ans.setdefault(s, 0)

    ans[s] += 1



m = int(eval(input()))

for _ in range(m):

    t = eval(input())

    ans.setdefault(t, 0)

    ans[t] -= 1



ans = sorted(list(ans.items()), key=lambda x: x[1], reverse=True)

print((max(0, ans[0][1])))

n = [eval(input()) for _ in range(int(eval(input())))]
m = [eval(input()) for _ in range(int(eval(input())))]
l = list(set(n))
print((max(0, max(n.count(l[i]) - m.count(l[i]) for i in range(len(l))))))

ans = {}
n = int(eval(input()))
for _ in range(n):
    s = eval(input())
    ans.setdefault(s, 0)
    ans[s] += 1
m = int(eval(input()))
for _ in range(m):
    t = eval(input())
    ans.setdefault(t, 0)
    ans[t] -= 1
ans = sorted(list(ans.items()), key=lambda x: x[1], reverse=True)
print((max(0, ans[0][1])))

-n = [eval(input()) for _ in range(int(eval(input())))] -m = [eval(input()) for _ in range(int(eval(input())))] -l = list(set(n)) -print((max(0, max(n.count(l[i]) - m.count(l[i]) for i in range(len(l)))))) +ans = {} +n = int(eval(input())) +for _ in range(n): +    s = eval(input()) +    ans.setdefault(s, 0) +    ans[s] += 1 +m = int(eval(input())) +for _ in range(m): +    t = eval(input()) +    ans.setdefault(t, 0) +    ans[t] -= 1 +ans = sorted(list(ans.items()), key=lambda x: x[1], reverse=True) +print((max(0, ans[0][1])))