n = int(eval(input()))

t, a = list(map(int, input().split()))

h = list([abs(t-a-x*0.006) for x in list(map(int, input().split()))])

print((h.index(min(h))+1))
eval(input())

t, a = list(map(int, input().split()))

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

arr = []



for h in hs:

    arr.append(abs(t - h * 0.006 - a))

print((arr.index(min(arr))+1))
n = int(eval(input()))
t, a = list(map(int, input().split()))
h = list([abs(t - a - x * 0.006) for x in list(map(int, input().split()))])
print((h.index(min(h)) + 1))

eval(input())
t, a = list(map(int, input().split()))
hs = list(map(int, input().split()))
arr = []
for h in hs:
    arr.append(abs(t - h * 0.006 - a))
print((arr.index(min(arr)) + 1))

-n = int(eval(input())) +eval(input()) -h = list([abs(t - a - x * 0.006) for x in list(map(int, input().split()))]) -print((h.index(min(h)) + 1)) +hs = list(map(int, input().split())) +arr = [] +for h in hs: +    arr.append(abs(t - h * 0.006 - a)) +print((arr.index(min(arr)) + 1))