#include<cstdio>
#include<algorithm>
#include<queue>
#define min(a,b) (a<b?a:b)
using std::sort;
int n,k,q,a[2050],tul[2050],ab[2050],num,ans=0x3f3f3f3f;
void work(int x){
	int beg=0; num=0;
	for(int i=1;i<=n;i++){
		if(a[i]>=a[x]) if(!beg) beg=i;
		if(a[i+1]<a[x]&&beg){
			if(i-beg+1<k){beg=0;continue;}
			for(int j=beg;j<=i;j++) ab[j]=a[j];
			sort(ab+beg,ab+i+1);
			for(int j=beg;j<=i-k+1;j++)
				tul[++num]=ab[j];
			beg=0;
		}
	}
	if(num<q) return ;
	sort(tul+1,tul+num+1);
	ans=min(ans,tul[q]-a[x]);
	return ;
}
int main(){
	scanf("%d%d%d",&n,&k,&q);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	for(int i=1;i<=n;i++)
		work(i);
	printf("%d\n",ans);
	return 0;
}