eval(input())

l=sorted(map(int,input().split()))

from bisect import *

a=0

for i in range(l[0],l[-1]+1):

  a=max(a,bisect(l,i+1)-bisect_left(l,i-1))

print(a)
n,*l=list(map(int,open(0).read().split()))

c=[0]*(10**5+3)

for i in l:

  for j in (-1,0,1): c[i+j]+=1

print((max(c)))
eval(input())
l = sorted(map(int, input().split()))
from bisect import *

a = 0
for i in range(l[0], l[-1] + 1):
    a = max(a, bisect(l, i + 1) - bisect_left(l, i - 1))
print(a)

n, *l = list(map(int, open(0).read().split()))
c = [0] * (10**5 + 3)
for i in l:
    for j in (-1, 0, 1):
        c[i + j] += 1
print((max(c)))

-eval(input()) -l = sorted(map(int, input().split())) -from bisect import * - -a = 0 -for i in range(l[0], l[-1] + 1): -    a = max(a, bisect(l, i + 1) - bisect_left(l, i - 1)) -print(a) +n, *l = list(map(int, open(0).read().split())) +c = [0] * (10**5 + 3) +for i in l: +    for j in (-1, 0, 1): +        c[i + j] += 1 +print((max(c)))