n = int(eval(input()))

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

mini, res = n+1, 0

for i in arr:

    if i < mini:

        mini = i

        res += 1

print(res)

n = int(eval(input()))

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

m = p[0]

ans = 0

for i in p:

    if (m >= i):

        ans += 1

    m = min(i,m)

print(ans)
n = int(eval(input()))
arr = list(map(int, input().split()))
mini, res = n + 1, 0
for i in arr:
    if i < mini:
        mini = i
        res += 1
print(res)

n = int(eval(input()))
p = list(map(int, input().split()))
m = p[0]
ans = 0
for i in p:
    if m >= i:
        ans += 1
    m = min(i, m)
print(ans)

-arr = list(map(int, input().split())) -mini, res = n + 1, 0 -for i in arr: -    if i < mini: -        mini = i -        res += 1 -print(res) +p = list(map(int, input().split())) +m = p[0] +ans = 0 +for i in p: +    if m >= i: +        ans += 1 +    m = min(i, m) +print(ans)