#include<bits/stdc++.h>
#define N 1000005
using namespace std;
int b[N],a[N],now[N],n,k,q;
int solve(int l,int r,int x)
{
	int tmp=0;
	for(int i=l;i<=r;i++)
	{
		if(a[i]<=x)tmp++;
	}
	return min(tmp,max(0,r-l-k+2));
}
int tp[N],cnt;
bool pan(int x)
{
	for(int i=1;i<=n;i++)
	{
		int now=0,cnt=0;
		tp[++cnt]=0;
		for(int j=1;j<=n;j++)if(a[j]<b[i])tp[++cnt]=j;
		tp[++cnt]=n+1;
		for(int j=1;j<cnt;j++)
		{
			now+=solve(tp[j]+1,tp[j+1]-1,b[i]+x);
		}
		if(now>=q)return 1;
	}
	return 0;
}
int main()
{
	cin>>n>>k>>q;
	for(int i=1;i<=n;i++)scanf("%d",&a[i]),b[i]=a[i];
	sort(b+1,b+n+1);
	int l=0,r=1000000000;
	while(l<r)
	{
		int mid=(l+r)>>1;
		if(pan(mid))r=mid;
		else l=mid+1;
	}
	printf("%d\n",l);
	
	return 0;
}