var b=["":0]
for _ in 0..<Int(readLine()!)!{
    let s=readLine()!
    b[s]=(b[s] ?? 0)+1
}
for _ in 0..<Int(readLine()!)! {
    let t=readLine()!
    b[t]=(b[t] ?? 0)-1
}
print(b.sort{$0.value>$1.value}[0].value)