n = int(eval(input()))

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

min_sp, cnt = p[0], 0

for i in range(n):

    if p[i] <= min_sp:

        cnt += 1

        min_sp = p[i]

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

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

min_sp, cnt = p[0], 0

for pi in p:

    if pi <= min_sp:

        cnt += 1

        min_sp = pi

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

n = int(eval(input()))
p = list(map(int, input().split()))
min_sp, cnt = p[0], 0
for pi in p:
    if pi <= min_sp:
        cnt += 1
        min_sp = pi
print(cnt)

-for i in range(n): -    if p[i] <= min_sp: +for pi in p: +    if pi <= min_sp: -        min_sp = p[i] +        min_sp = pi