N = int(eval(input()))

T, A = list(map(int, input().split()))



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



mn = None

for i, h in enumerate(H):

    d = abs(A - (T - h * 0.006))

    mn = (i, d) if mn is None or mn[1] > d else mn

print((mn[0] + 1))
N = int(eval(input()))

T, A = list(map(int, input().split()))

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



mn = None

for i in range(N):

    x = abs(A - (T - H[i] * 0.006))

    if mn is None or x < mn[1]:

        mn = (i, x)

print((mn[0] + 1))
N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
mn = None
for i, h in enumerate(H):
    d = abs(A - (T - h * 0.006))
    mn = (i, d) if mn is None or mn[1] > d else mn
print((mn[0] + 1))

N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
mn = None
for i in range(N):
    x = abs(A - (T - H[i] * 0.006))
    if mn is None or x < mn[1]:
        mn = (i, x)
print((mn[0] + 1))

-for i, h in enumerate(H): -    d = abs(A - (T - h * 0.006)) -    mn = (i, d) if mn is None or mn[1] > d else mn +for i in range(N): +    x = abs(A - (T - H[i] * 0.006)) +    if mn is None or x < mn[1]: +        mn = (i, x)