Go: /*
	http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1600&lang=jp
	Entrance Examination
*/

package main

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

// 標準入力を取得するScannerのインスタンスを作成
var scanner = bufio.NewScanner(os.Stdin)

// 標準入力で各行を読み込みintとして返す

func readLine() int {
	if scanner.Scan() {
		number, _ := strconv.Atoi(scanner.Text())
		return number
	}
	return 0
}

func main() {
	// 改行から空白区切りに変更
	scanner.Split(bufio.ScanWords)

	// 0 0 0の行に到達するまでループする
	for {
		// 合格者、不合格者の境目=ギャップ
		m := readLine()   // 受験者の人数
		min := readLine() // 合格者の最小人数
		max := readLine() // 合格者の最大人数

		// 0 0 0の行に到達したのでループを抜け終了する
		if m == 0 && min == 0 && max == 0 {
			break
		}

		// 得点を格納するsliceを初期化
		ps := make([]int, 0, m)

		// sliceに得点を格納する
		for i := 0; i < m; i++ {
			ps = append(ps, readLine())
		}

		tmp := 0    // ギャップを一時的に保存
		gap := 0    // ギャップの最大値を保存
		answer := 0 // ギャップが最大になった時のindex(合格人数)を保存

		// 合格者の最小人数〜最大人数のギャップを計算する
		for i := min; i <= max; i++ {
			tmp = ps[i-1] - ps[i]

			// ギャップの最大値が更新された場合、最大値と合格人数を更新する
			// ギャップが同じ値だった場合も合格人数を更新する
			// (合格人数が多い方が優先されるので後から現れた値が優先される)
			if tmp >= gap {
				gap = tmp
				answer = i
			}
		}
		fmt.Println(answer)
	}
}

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])