n,m = list(map(int,input().split()))

A = [int(eval(input())) for _ in range(n)]

V = [0 for _ in range(n)]

for i in range(m):

  b = int(eval(input()))

  for j in range(n):

    if A[j] <= b:

      V[j] += 1

      break



print((V.index(max(V)) + 1))

def main():

  n,m = list(map(int,input().split()))

  A = [int(eval(input())) for _ in range(n)]

  V = [0 for _ in range(n)]

  for i in range(m):

    b = int(eval(input()))

    for j in range(n):

      if A[j] <= b:

        V[j] += 1

        break

  print((V.index(max(V)) + 1))



main()

n, m = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(n)]
V = [0 for _ in range(n)]
for i in range(m):
    b = int(eval(input()))
    for j in range(n):
        if A[j] <= b:
            V[j] += 1
            break
print((V.index(max(V)) + 1))

def main():
    n, m = list(map(int, input().split()))
    A = [int(eval(input())) for _ in range(n)]
    V = [0 for _ in range(n)]
    for i in range(m):
        b = int(eval(input()))
        for j in range(n):
            if A[j] <= b:
                V[j] += 1
                break
    print((V.index(max(V)) + 1))


main()

-n, m = list(map(int, input().split())) -A = [int(eval(input())) for _ in range(n)] -V = [0 for _ in range(n)] -for i in range(m): -    b = int(eval(input())) -    for j in range(n): -        if A[j] <= b: -            V[j] += 1 -            break -print((V.index(max(V)) + 1)) +def main(): +    n, m = list(map(int, input().split())) +    A = [int(eval(input())) for _ in range(n)] +    V = [0 for _ in range(n)] +    for i in range(m): +        b = int(eval(input())) +        for j in range(n): +            if A[j] <= b: +                V[j] += 1 +                break +    print((V.index(max(V)) + 1)) + + +main()