Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	for {
		m, nMin, nMax := nextInt(sc), nextInt(sc), nextInt(sc)
		if m == 0 && nMin == 0 && nMax == 0 {
			break
		}

		score_list := []int{}
		for i := 0; i < m; i++ {
			score_list = append(score_list, nextInt(sc))
		}

		// 最低合格者数と最高合格者数の間の各得点間のギャップが最大になる合格者数を取得する
		scoreGap := 0
		scoreGapMax := 0
		qualifiedNum := 0
		for n := nMin; n <= nMax; n++ {
			scoreGap = score_list[n-1] - score_list[n]
			if scoreGap >= scoreGapMax {
				scoreGapMax = scoreGap
				qualifiedNum = n
			}
		}

		fmt.Println(qualifiedNum)
	}
}

Python: # coding: utf-8
while 1:
    m,n_min,n_max=map(int,input().split())
    if m==0:
        break
    data=[]
    for i in range(m):
        data.append(int(input()))
    data=sorted(data,reverse=True)
    mx=(-1,-1)
    for i in range(n_min,n_max+1):
        if data[i-1]-data[i]>=mx[0]:
            mx=(data[i-1]-data[i],i)
    print(mx[1])

Python: answers = []
while True:
    head = input()
    if head == "0 0 0":
        break
    nums = head.split(" ")
    num = int(nums[0])
    mini = int(nums[1])
    maxi = int(nums[2]) 

    scores = []

    gaps = []

    for _ in range(int(head[0])):
        scores.append(int(input()))
    
    for i in range(mini, maxi + 1):
        oks = scores[:i]
        ngs = scores[i:]
        gap = oks[-1] - ngs[0]
        gaps.append((i,gap))

    filtered = list(filter(lambda x: x[1] == max(map(lambda x: x[1], gaps)), gaps))
    sorted(filtered,key=lambda x: x[0])
    answers.append(filtered[-1][0])

for i in answers:
    print(i)

Python: while True:
    m,mn,mx = map(int,input().split())
    if m==0: break
    l = [int(input()) for _ in range(m)]
    r = []
    for i in range(mn,mx+1):
        r += [l[i-1]-l[i]]
    print(max([i+mn for i,x in enumerate(r) if x==max(r)]))

Python: # coding=utf-8
 
###
### for atcorder program
###
 
import sys
import math
 
# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338
 
    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []
 
        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist
 
    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)
 
    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)
 
    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans
 
mymath = mymath()
 
### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()
 
output = output()
 
### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]
 
#R = float(input())
#A.append(list(map(int,input().split())))
 
#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]
 
#abc list
#abc = [chr(ord('a') + i) for i in range(26)]
 
### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")  

def get_input():
  N = []
  while True:
    try:
      N.append(input())
      #N.append(int(input()))
    except EOFError:
      break
  return N


while(True):
  M, N_min, N_max = [int(x) for x in input().split()]
  P = []

  if M == 0 and N_min == 0 and N_max == 0:
    break

  for i in range(M):
    P.append(int(input()))

  G_max = 0
  I = None

  for i in range(N_min-1, N_max):
    G = P[i] - P[i+1]
    if G >= G_max:
      G_max = G
      I = i+1
    
  print(I)

Python: while True:
	m,a,b=map(int,input().split())
	if m==a==b==0:
		exit()
	ans=10**8
	ran=-1
	q=[]
	for i in range(m):
		x=int(input())
		q.append(x)
	for i in range(m-1):
		if -q[i+1]+q[i]>=ran and a<=i+1<=b:
			ans=i+1
			ran=-q[i+1]+q[i]
	print(ans)

Python: def main():
    while True:
        m, nmin, nmax = [int(s) for s in input().strip().split(' ')]
        if m == 0:
            break

        plist = sorted((int(input().strip()) for _ in range(m)), reverse=True)
        ni = 0
        gap = 0
        for i in range(nmin-1, nmax):
            ngap = plist[i] - plist[i+1]
            if gap <= ngap:
                gap = ngap
                ni = i
        print(ni+1)

if __name__ == '__main__':
    main()

Python: while 1:
    m, nmin, nmax = map(int,input().split())
    if m==0: break
    p = []
    ans = 0
    smax = 0
    for i in range(m):
        p.append(int(input()))
        if nmin <= i < nmax+1 and p[i-1] - p[i] >= smax:
            # print(p[i - 1], p[i], smax)
            smax = p[i-1] - p[i]
            ans = i
    print(ans)

Python: 
"""
5 2 4
100
90
82
70
65
"""

while True:
    m, nmin, nmax = map(int, input().split())
    if m == 0:
        break
    scores = [int(input()) for _ in range(m)]
    # print(scores)

    dif_score = [scores[0]-scores[1]]
    for i in range(1, m-1):
        dif_score.append(scores[i]-scores[i+1])

    dif_score = dif_score[nmin-1:nmax]

    # print(dif_score)

    max_dif_score = max(dif_score)

    ans = -1
    for i in range(len(dif_score)):
        if dif_score[i] == max_dif_score:
            ans = i

    print(ans+nmin)

Python: # from sys import exit
while(True):
    M, Nmin, Nmax = [int(n) for n in input().split()]
    if M + Nmin + Nmax == 0:
        break
    # N = int(input())
    P = [int(input()) for _ in range(M)]
    # S = str(input())
    # L = len(S)
    # T = str(input())
    # exit()
    dif = [0]*(M)
    for i in range(len(P)-1):
        dif[i+1] = P[i] - P[i+1]
    # print(dif)
    ans = Nmin
    tmp = dif[Nmin]
    for i in range(Nmin+1, Nmax+1):
        if dif[i] >= tmp:
            ans = i
            tmp = dif[i]
    print(ans)

Python: da = list(map(int,input().split()))
k = []
while sum(da) != 0:
	for i in range(da[0]):
		k.append(int(input()))
	for i in range(da[0]):
		k[da[0] - 1 -i] = k[da[0] - 1 -i] - k[da[0]-2 -i]


	pp = k[da[1]:da[2]+1]
	print(pp)
	qq = min(pp)

	for i in range(len(pp)):
		if pp[i] == qq:
			jj = i

	print(da[1]+jj)

	da = list(map(int,input().split()))
	k = []

Python: head = input().split(" ")
while head != "0 0 0":
    num = int(head[0])
    mini = int(head[1])
    maxi = int(head[2]) 

    scores = []

    gaps = []

    for _ in range(int(head[0]) + 1):
        scores.append(int(input()))
    
    for i in range(mini, maxi + 1):
        oks = scores[:i]
        ngs = scores[i:]
        gap = oks[-1] - ngs[0]
        gaps.append((i,gap))

    filtered = list(filter(lambda x: x[1] == max(map(lambda x: x[1], gaps)), gaps))
    sorted(filtered,key=lambda x: x[0])
    print(filtered[-1][0])

Python: N = input().split(" ")
a = [input() for i in range(int(N[0]))]
ma =int(N[2])
mi =int(N[1])
gap = []
x = mi
while x != ma + 1:
   value = int(a[x - 1]) - int(a[x])
   gap.append(value)
   x = x + 1
import numpy as np
gapIndex = np.array(gap)
maxIndex = [i for i, x in enumerate(gapIndex) if x == max(gapIndex)]
print(int(maxIndex[0]) + 2)