n,k,q=map(int,input().split())
arr=list(map(int,input().split()))
arr2=sorted(arr)
ans=10**18
m=arr2[0]
for val in arr:
  tmp=[]
  vals=[]
  l=0
  if val==m:
    tmp=[arr2[:]]
  else:
    for i in range(n):
      if arr[i]<val:
        tmp.append(arr[l:i])
        l=i+1
  for i in range(len(tmp)):
    tmp=sorted(tmp)
  for arrs in tmp:
    if len(arrs)<k:
      continue
    else:
      vals+=arrs[:len(arrs)-k+1]
  vals=sorted(vals)
  if len(vals)<q:
    continue
  else:
    ans=min(ans,vals[q-1]-val)
print(ans)