N = int(eval(input()))

A = list(map(int,input().split()))



afters = []

for ai in range(N):

	for sign in [-1,0,1]:

		afters.append(A[ai]+sign)

		

uniq = set(afters)



countDic = {}

sas = sorted(afters)

for a in sas:

	if a in list(countDic.keys()):

		countDic[a] += 1

	else:

		countDic[a] = 1

	

print((max(countDic.values())))
N = int(eval(input()))

src = list(map(int, input().split()))

MAX = 10**5

 

counts = [0 for i in range(MAX+2)]

for a in src:

	a += 1

	

	counts[a-1] += 1

	counts[a] += 1

	counts[a+1] += 1

 

print((max(counts[1:-2])))
N = int(eval(input()))
A = list(map(int, input().split()))
afters = []
for ai in range(N):
    for sign in [-1, 0, 1]:
        afters.append(A[ai] + sign)
uniq = set(afters)
countDic = {}
sas = sorted(afters)
for a in sas:
    if a in list(countDic.keys()):
        countDic[a] += 1
    else:
        countDic[a] = 1
print((max(countDic.values())))

N = int(eval(input()))
src = list(map(int, input().split()))
MAX = 10**5
counts = [0 for i in range(MAX + 2)]
for a in src:
    a += 1
    counts[a - 1] += 1
    counts[a] += 1
    counts[a + 1] += 1
print((max(counts[1:-2])))

-A = list(map(int, input().split())) -afters = [] -for ai in range(N): -    for sign in [-1, 0, 1]: -        afters.append(A[ai] + sign) -uniq = set(afters) -countDic = {} -sas = sorted(afters) -for a in sas: -    if a in list(countDic.keys()): -        countDic[a] += 1 -    else: -        countDic[a] = 1 -print((max(countDic.values()))) +src = list(map(int, input().split())) +MAX = 10**5 +counts = [0 for i in range(MAX + 2)] +for a in src: +    a += 1 +    counts[a - 1] += 1 +    counts[a] += 1 +    counts[a + 1] += 1 +print((max(counts[1:-2])))