n = int(eval(input()))

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

nm = len(h)

ans = 0

for _ in range(nm):

    cnt = 0

    while True:

        if len(h) == 1:

            break

        if h[0] >= h[1]:

            cnt += 1

            h.pop(0)

        else:

            h.pop(0)

            break

    ans = max(ans, cnt)

print(ans)

N = int(eval(input()))

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

ans = 0

cans = 0

for i in range(1,N):

    if N_List[i] <= N_List[i-1]:

        cans += 1

    if cans > ans:

        ans = cans

    if N_List[i] > N_List[i-1]:

        cans = 0

    

print(ans)
n = int(eval(input()))
h = list(map(int, input().split()))
nm = len(h)
ans = 0
for _ in range(nm):
    cnt = 0
    while True:
        if len(h) == 1:
            break
        if h[0] >= h[1]:
            cnt += 1
            h.pop(0)
        else:
            h.pop(0)
            break
    ans = max(ans, cnt)
print(ans)

N = int(eval(input()))
N_List = list(map(int, input().split()))
ans = 0
cans = 0
for i in range(1, N):
    if N_List[i] <= N_List[i - 1]:
        cans += 1
    if cans > ans:
        ans = cans
    if N_List[i] > N_List[i - 1]:
        cans = 0
print(ans)

-n = int(eval(input())) -h = list(map(int, input().split())) -nm = len(h) +N = int(eval(input())) +N_List = list(map(int, input().split())) -for _ in range(nm): -    cnt = 0 -    while True: -        if len(h) == 1: -            break -        if h[0] >= h[1]: -            cnt += 1 -            h.pop(0) -        else: -            h.pop(0) -            break -    ans = max(ans, cnt) +cans = 0 +for i in range(1, N): +    if N_List[i] <= N_List[i - 1]: +        cans += 1 +    if cans > ans: +        ans = cans +    if N_List[i] > N_List[i - 1]: +        cans = 0