Buggy python submission (verdict: Runtime Error):
s=[input() for _ in range(int(input()))]
t=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l)))))n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):
s=[input() for _ in range(int(input()))]
t=[input() for _ in range(int(input()))]
l=list(set(n))

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

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):
s=[input() for _ in range(int(input()))]
t=[input() for _ in range(int(input()))]
l=list(set(n))
#s内の重複消去　リストに変更
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l)))))

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):

s=[input() for _ in range(int(input()))]
t=[input() for _ in range(int(input()))]
l=list(set(n))
#s内の重複消去　リストに変更
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):
s=[input() for _ in range(input())]
t=[input() for _ in range(input())]
l=list(set(n))
#s内の重複消去　リストに変更
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
ans=""
ans_1=0
for S in s:
    if s.count(S)-t.count(S)>0:
        ans=S
        if s.count(S)-t.count(S)>ans:
            ans_1=s.count(S)-t.count(S)
if ans_1>=0:
    print(ans)
else:
    print("0")

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]

ans=input()
print(s.count(ans)-t.count(ans))

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")

Buggy python submission (verdict: Runtime Error):
N,M=int(input())
s=[input() for _ in range(N)]
t=[input() for _ in range(M)]
ans=input()
print(s.count(ans)-t.count(ans))

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
def ans1(x):
    return s.count(x)-t.count(x)
ans2=0
ans_1=0
for S in s:
    if ans1(S)>0 and ans1(S)>ans2:
            ans2=ans1(S)
if ans2>=0:
    print(ans2)
else:
    print("0")