n = int(eval(input()))

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



num = [0] * (10**5+1)



for a in al:

    num[a] += 1



ans = 0

for i in range(10**5+2):

    x_cnt = sum(num[i-1:i+2])

    ans = max(ans, x_cnt)



print(ans)
n = int(eval(input()))

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



ans = [0]*(10**5+2)



for a in al:

    ans[a] += 1

    ans[a-1] += 1

    ans[a+1] += 1



print((max(ans)))
n = int(eval(input()))
al = list(map(int, input().split()))
num = [0] * (10**5 + 1)
for a in al:
    num[a] += 1
ans = 0
for i in range(10**5 + 2):
    x_cnt = sum(num[i - 1 : i + 2])
    ans = max(ans, x_cnt)
print(ans)

n = int(eval(input()))
al = list(map(int, input().split()))
ans = [0] * (10**5 + 2)
for a in al:
    ans[a] += 1
    ans[a - 1] += 1
    ans[a + 1] += 1
print((max(ans)))

-num = [0] * (10**5 + 1) +ans = [0] * (10**5 + 2) -    num[a] += 1 -ans = 0 -for i in range(10**5 + 2): -    x_cnt = sum(num[i - 1 : i + 2]) -    ans = max(ans, x_cnt) -print(ans) +    ans[a] += 1 +    ans[a - 1] += 1 +    ans[a + 1] += 1 +print((max(ans)))