N = int(eval(input()))

P = tuple(map(int, input().split()))



pmin = P[0]



m = 1



for i in range(1, N, 1):

    if P[i] < pmin:

        pmin = P[i]

        m += 1



print(m)
N = int(eval(input()))

M = 0

for P in map(int, input().split()):

    if P <= N:

        N = P

        M += 1

print(M)
N = int(eval(input()))
P = tuple(map(int, input().split()))
pmin = P[0]
m = 1
for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1
print(m)

N = int(eval(input()))
M = 0
for P in map(int, input().split()):
    if P <= N:
        N = P
        M += 1
print(M)

-P = tuple(map(int, input().split())) -pmin = P[0] -m = 1 -for i in range(1, N, 1): -    if P[i] < pmin: -        pmin = P[i] -        m += 1 -print(m) +M = 0 +for P in map(int, input().split()): +    if P <= N: +        N = P +        M += 1 +print(M)