n = int(eval(input()))

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



num = 0

max1 = li[0]

for i in range(n):

    if li[i] >=max1:

        max1 = li[i]

        num += 1



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

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

ans = 0

for i in range(1,n):

    if max(L[:i]) <= L[i]:

        ans += 1

print((ans+1))
n = int(eval(input()))
li = list(map(int, input().split()))
num = 0
max1 = li[0]
for i in range(n):
    if li[i] >= max1:
        max1 = li[i]
        num += 1
print(num)

n = int(eval(input()))
L = list(map(int, input().split()))
ans = 0
for i in range(1, n):
    if max(L[:i]) <= L[i]:
        ans += 1
print((ans + 1))

-li = list(map(int, input().split())) -num = 0 -max1 = li[0] -for i in range(n): -    if li[i] >= max1: -        max1 = li[i] -        num += 1 -print(num) +L = list(map(int, input().split())) +ans = 0 +for i in range(1, n): +    if max(L[:i]) <= L[i]: +        ans += 1 +print((ans + 1))