Buggy python submission (verdict: Runtime Error):
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = t.most_common(1)[0][1]
print(max(ans, t))


Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s, t = []
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
print(ans)


Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s, t = [], []
for _ in range(n):
    s.append(input())
m = int(input())
for _ in range(m):
    t.append(input())
u = Counter(s) - Counter(t)
ans = u.most_common(1)[0][1]
print(ans)


Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s, t = [], []
for _ in range(n):
    s.append(input())
m = int(input())
for _ in range(n):
    t.append(input())
u = Counter(s) - Counter(t)
ans = u.most_common(1)[0][1]
print(ans)


Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s, t = [], []
for _ in range(n):
    s.append(input())
m = int(input())
for _ in range(n):
    t.append(input())
u = Counter(s) - Counter(t)
ans = u.most_common(1)
print(ans[1])


Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s = Counter(int)
for _ in n:
    word = str(input())
    s[word] += 1
m = int(input())
for _ in m:
    word = str(input())
    if word in s.keys():
        s[word] -= 1
ans = s.most_common(1)
print(ans[1])

Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s = Counter(int)
for _ in n:
    word = str(input())
    s[word] += 1
m = int(input())
for _ in m:
    word = str(input())
    if word in s.keys():
        s[word] -= 1
print(s.most_common(1)[1])
    

Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s = Counter(int)
for _ in n:
    word = str(input())
    s[word] += 1
m = int(input())
for _ in m:
    word = str(input())
    if word in s.keys():
        s[word] -= 1
print(s.most_common(1))
    

Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s, t = Counter(int)
for _ in n:
    word = str(input())
    s[word] += 1
m = int(input())
for _ in m:
    word = str(input())
    s[word] -= 1
print(s.most_common(1))
    

Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
s, t = Counter(int)
for _ in n:
    word = input()
    s[word] += 1
m = int(input())
for _ in m:
    word = input()
    s[word] -= 1
print(s.most_common(1))
    

Fixed submission:
from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))