#!/usr/local/gnu/bin/bash
read n
declare -A p
for i in `seq $n`
do
    read s
    p[$s]=$((p[$s]+1))
done
read m
for i in `seq $m`
do
    read t
    p[$t]=$((p[$t]-1))
done
echo 0 ${p[@]} | tr ' ' '\n' | sort -nr | head -1
