Takahashi has N blue cards and M red cards. A string is written on each card. The string written on the i-th blue card is s_i, and the string written on the i-th red card is t_i.  Takahashi will now announce a string, and then check every card. Each time he finds a blue card with the string announced by him, he will earn 1 yen (the currency of Japan); each time he finds a red card with that string, he will lose 1 yen.  Here, we only consider the case where the string announced by Takahashi and the string on the card are exactly the same. For example, if he announces `atcoder`, he will not earn money even if there are blue cards with `atcoderr`, `atcode`, `btcoder`, and so on. (On the other hand, he will not lose money even if there are red cards with such strings, either.)  At most how much can he earn on balance?  Note that the same string may be written on multiple cards.
from collections import Counter
N = int(input())
s = sorted([input() for _ in range(N)])
M = int(input())
t = sorted([input() for _ in range(M)])

print(Counter(s))
d = {}
for val,cnt in Counter(s).items():
    d[val] = cnt
print(Counter(t))

for val,cnt in Counter(t).items():
    if val in d:
        d[val] -= cnt
print(max(max(d.values()),0))
from collections import Counter
N = int(input())
s = sorted([input() for _ in range(N)])
M = int(input())
t = sorted([input() for _ in range(M)])

d = {}
for val,cnt in Counter(s).items():
    d[val] = cnt

for val,cnt in Counter(t).items():
    if val in d:
        d[val] -= cnt
print(max(max(d.values()),0))