There are N hills in a row numbered 1 through N from left to right. Each hill has a height; for each valid i, the height of the i-th hill is Hi. Chef is initially on the leftmost hill (hill number 1). He can make an arbitrary number of jumps (including zero) as long as the following conditions are satisfied:

- Chef can only jump from each hill to the next hill, i.e. from the i-th hill, he can jump to the i+1-th hill (if it exists).
- It's always possible to jump to a hill with the same height as the current hill.
- It's possible to jump to a taller hill if it's higher than the current hill by no more than U.
- It's possible to jump to a lower hill if it's lower than the current hill by no more than D.
- Chef can use a parachute and jump to a lower hill regardless of its height (as long as it's lower than the current hill). This jump can only be performed at most once.

Chef would like to move as far right as possible. Determine the index of the rightmost hill Chef can reach.

-----Input-----
- The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains three space-separated integers N, U and D.
- The second line contains N space-separated integers H1, H2, ..., HN.

-----Output-----
For each test case, print a single line containing one integer — the index of the rightmost reachable hill.

-----Constraints-----
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 100
- 1 ≤ U, D ≤ 1,000,000
- 1 ≤ Hi ≤ 1,000,000 for each valid i

-----Subtasks-----
Subtask #1 (100 points): original constraints

-----Example-----
Input:

3
5 3 2
2 5 2 6 3
5 2 3
4 4 4 4 4
5 2 7
1 4 3 2 1

Output:

3
5
1

-----Explanation-----
Example case 1: Chef can jump to second hill because it's higher by no more than U=3 than first hill, to jump to third hill Chef has to use parachute 
because it's lower than second hill by 3 which is more than D=2, Chef can't jump to fourth hill because it's higher than third hill by 4 which is more than U=3
Example case 2: All hills are of the same height, so chef can reach the last hill with no problems.
Example case 3: Chef can't jump to second hill because it's too high for him

Starter code:

Solutions:
for _ in range(int(input())):
 N,U,D=list(map(int,input().split()))
 H=list(map(int,input().split()))
 jumps=0
 paracount=0
 for i in range(len(H)-1):
  if H[i+1]-H[i]<=U and H[i+1]>=H[i]:
   jumps+=1
  elif H[i]>=H[i+1] and H[i]-H[i+1]<=D:
   jumps+=1
  elif H[i]-H[i+1]>D and paracount==0:
   jumps+=1
   paracount=1
  else: break
 print(jumps+1)


t = int(input())
for t in range(0,t):   
 q= list(map (int, input().rstrip().split()))
 n=q[0]
 u=q[1]
 d=q[2]
 e=0
 c=1
 a= list(map (int, input().rstrip().split()))
 for i in range(0,n-1):
  if(a[i+1]>a[i]):
   if(a[i+1]-a[i]<=u):
    c=c+1 
   else:
    break
  elif(a[i+1]==a[i]):
   c=c+1
  else: 
   if(a[i]-a[i+1]<=d):
    c=c+1 
   elif(a[i]-a[i+1]>d and e==0):
    c=c+1 
    e=1 
   else:
    break 
   
 print(c) 
    
   
 
    
    
    
   


for _ in range(int(input())):
 n, u, d = list(map(int, input().split()))
 hills = list(map(int, input().split()))
 u *= -1
 
 curr = hills[0]
 count = 0
 para = True
 for h in hills[1:]:
  if u <= curr-h <= d:
   count += 1
  elif para and curr-h > 1:
   count += 1
   para = False
  else:
   break
  
  curr = h
 
 print(count+1)

t = int(input())

for _ in range(t):
 n, u, d = [int(x) for x in input().split()]
 a = [int(x) for x in input().split()]
 
 c = 1
 j = 1
 
 for i in range(n-1):
  if(a[i] >= a[i+1]):
   if(abs(a[i] - a[i+1]) <= d):
    c+=1
   elif j == 1:
    c+=1
    j = 0
   else:
    break
  elif(a[i] < a[i+1]):
   if(abs(a[i] - a[i+1]) <= u):
    c += 1
   else:
    break

 print(c)

for _ in range(int(input())) :
 n, u, d = map(int, input().split())
 a = list(map(int, input().split()))
 x = 1
 count = 1
 for i in range(n-1) :
  if a[i] <= a[i + 1] :
   if a[i] + u >= a[i + 1] :
    count += 1
   elif a[i] + u < a[i + 1] :
    break
  else :
   if a[i] - d <= a[i + 1] :
    count += 1
   elif x == 1 :
    count += 1
    x = 0
   else :
    break
 print(count)

for _ in range(int(input())):
 N, U, D = map(int, input().split())
 L = list(map(int, input().split()))
 c = 0
 para = True
 while c < N-1:
  if L[c] <= L[c+1] and L[c+1]-L[c]<=U:
   c += 1 
  elif L[c] > L[c+1] and L[c]-L[c+1]<=D:
   c += 1 
  elif L[c] > L[c+1] and para:
   c += 1 
   para = False
  else:
   break
 print(c+1)

# cook your dish here
for h in range(int(input())):
 n,u,d=map(int,input().split())
 l=list(map(int,input().split()))
 c=1
 x=l[0]
 f=0
 
 for i in range(1,n):
   if l[i]>=x:
    if l[i]-x<=u:
     x=l[i]
     c+=1
    else:
     break
   else:
    if x-l[i]<=d:
     x=l[i]
     c+=1
    elif f==0:
     x=l[i]
     c+=1 
     f=1
    else:
     break
    
 print(c)

# cook your dish here
for _ in range(int(input())):
 n,u,d=list(map(int,input().split()))
 l=list(map(int,input().split()))
 p=0
 c=0
 for i in range(1,n):
  if l[i]>=l[i-1]:
   if l[i]-l[i-1]<=u:
    c+=1
   else:
    break
  else:
   if l[i-1]-l[i]<=d:
    c+=1
   elif p==0:
    c+=1
    p=1
   else:
    break
 print(c+1)
  
    
  


# cook your dish here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 h = list(map(int,input().split()))
 b = 0 
 for i in range(n):
  if i==n-1:
   break
  if h[i+1]>h[i]:
   if h[i+1]-h[i]>u:
    break
  elif h[i+1]<h[i]:
   if h[i]-h[i+1]>d:
    if b==0:
     b=1
    else:
     break
 print(i+1)

t=int(input())
for i in range(t):
 n,u,d=list(map(int,input().split()))
 h=list(map(int,input().split()))
 flag=0
 flag1=0
 c=0
 for i in range(n-1):
  if(h[i+1]>h[i] and (h[i+1]-h[i])<=u):
   pass
  elif(h[i+1]>h[i] and (h[i+1]-h[i])>u):
   c=i
   break
  elif(h[i+1]<h[i]):
   if((h[i]-h[i+1])>d):
    if(flag==0):
     flag=1
     pass
    else:
     c=i
     break
   elif(h[i]-h[i+1]<=d):
    pass
  if(i==n-2):
   flag1=1
   break
 if(flag1==0):
  print(c+1)
 elif(flag1==1):
  print(n)
    
   
   
   
  
   
   
  


# cook your dish here
try:
 for _ in range(int(input())):
  n, u, d = map(int, input().split())
  l = list(map(int, input().split()))
  a = 1
  b = True
  for i in range(n-1):
   if l[i] < l[i + 1] and (l[i] + u) >= l[i + 1]:
    continue
   elif l[i] > l[i + 1] and l[i] <= (l[i + 1] + d):
    continue
   elif l[i] == l[i + 1]:
    continue
   elif a == 1 and l[i] > l[i + 1]:
    a -= 1
    continue
   else:
    b = False
    break
  if not b:
   print(i + 1)
  else:
   print(n)
except:
 pass

for _ in range(int(input())):
 a = input().split()
 n = int(a[0])
 u = int(a[1])
 d = int(a[2])
 h = list(map(int, input().split()))
 parachute = True
 curr = 1
 for i in range(n-1):
  if h[i+1] > h[i]:
   if h[i+1] > h[i]+u:
    break
  elif h[i+1] < h[i]:
   if h[i+1] < h[i]-d:
    if parachute:
     parachute = False
    else:
     break
  curr += 1
 print(curr)

# cook your dish here
for text in range(int(input())):
 n,u,d=map(int,input().split())
 l=list(map(int,input().split()))
 a=1
 b=True
 for i in range(n-1):
  if l[i]<l[i+1] and (l[i]+u)>=l[i+1]:
   continue
  elif l[i]>l[i+1] and l[i]<=(l[i+1]+d):
   continue
  elif l[i]==l[i+1]:
   continue
  elif a==1 and l[i]>l[i+1]:
   a-=1
   continue
  else:
   b=False
   break
 if b==False:
  print(i+1)
 else:
  print(n)

for text in range(int(input())):
 n,u,d=map(int,input().split())
 l=list(map(int,input().split()))
 a=1
 b=True
 for i in range(n-1):
  if l[i]<l[i+1] and (l[i]+u)>=l[i+1]:
   continue
  elif l[i]>l[i+1] and l[i]<=(l[i+1]+d):
   continue
  elif l[i]==l[i+1]:
   continue
  elif a==1 and l[i]>l[i+1]:
   a-=1
   continue
  else:
   b=False
   break
 if b==False:
  print(i+1)
 else:
  print(n)

standard_input = '''3
7 3 2
2 5 1 2 3 4 1
5 2 3
4 4 4 4 4
5 2 7
1 4 3 2 1'''

for _ in range(int(input())):
 n, u, d = map(int, input().split())
 d = -1 * d
 hill = list(map(int, input().split()))
 jump = 1
 para = 1
 for i in range(n-1):
  if hill[i+1] - hill[i] < d:
   if para == 0:
    break
   jump += 1
   para = 0
   continue
  if hill[i+1] - hill[i] <= u:
   jump += 1
  else:
   break
 print(jump)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  diff = 0
  if i==lenH-1:
   break
  
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
  
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  
  if i==lenH-1:
   break
  
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
  
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  diff = 0
  if i==lenH-1:
   break
  
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
  
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  if i==lenH-1:
   break
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  diff = 0
  if i==lenH-1:
   break
  
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
  
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  if i==lenH-1:
   break
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 for i in range(n):
  if i==n-1:break
  if H[i+1]>H[i] and H[i+1]-H[i]>u:break
  elif H[i+1]<H[i] and H[i]-H[i+1]>d:
   if parachute ==1:
    parachute =0
    continue
   else:break
 print(i+1)

# cook your code here
for _ in range(int(input())):
 n,u,d = map(int,input().split())
 H = list(map(int,input().split()))
 parachute=1
 lenH = len(H)
 for i in range(lenH):
  diff = 0
  if i==lenH-1:
   break
  
  if H[i+1]>H[i]:
   if H[i+1]-H[i]>u:
    break
  elif H[i+1]<H[i]:
   if H[i]-H[i+1]>d:
    if parachute ==1:
     parachute =0
     continue
    else:
     break
  
 print(i+1)

t=int(input())
for i in range(t):
 n,u,d=map(int,input().split())
 l=list(map(int,input().split()))
 ind=0
 c=0
 for j in range(n-1):
  if l[j]<l[j+1]:
   ans=l[j+1]-l[j]
   if ans<=u:
    ind=j+1
   else:
    break
  elif l[j]>l[j+1]:
   ans=l[j]-l[j+1]
   if ans<=d:
    ind=j+1
   else:
    if c==1:
     break
    else:
     ind=j+1
     c=c+1
  elif l[j]==l[j+1]:
   ind=j+1
   continue
 print(ind+1)