import collections

N = int(eval(input()))

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

for i in range(N):

    a.append(a[i] - 1)

    a.append(a[i] + 1)

c = collections.Counter(a)

print((c.most_common()[0][1]))

N = int(eval(input()))

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

A = [0] * (10 ** 5 + 5)

for ai in a:

    A[ai - 1] += 1

    A[ai] += 1

    A[ai + 1] += 1

print((max(A)))
import collections

N = int(eval(input()))
a = list(map(int, input().split()))
for i in range(N):
    a.append(a[i] - 1)
    a.append(a[i] + 1)
c = collections.Counter(a)
print((c.most_common()[0][1]))

N = int(eval(input()))
a = list(map(int, input().split()))
A = [0] * (10**5 + 5)
for ai in a:
    A[ai - 1] += 1
    A[ai] += 1
    A[ai + 1] += 1
print((max(A)))

-import collections - -for i in range(N): -    a.append(a[i] - 1) -    a.append(a[i] + 1) -c = collections.Counter(a) -print((c.most_common()[0][1])) +A = [0] * (10**5 + 5) +for ai in a: +    A[ai - 1] += 1 +    A[ai] += 1 +    A[ai + 1] += 1 +print((max(A)))