#include<bits/stdc++.h>
using namespace std;
const int N=2050;
int n,k,q;
int a[N],b[N],c[N];
int main()
{
	scanf("%d%d%d",&n,&k,&q);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	int mini=0x3f3f3f3f;
	for(int i=1;i<=n;i++) 
	{
		int size=0;
		for(int j=1;j<=n;j++) 
		{
			if(a[j]<a[i]) continue;
			int now=j;
			while(now<=n&&a[now+1]>=a[i]) now++;
			int num=now-j+1-k+1;
			if(num<=0) continue;
			int cnt=0;
			for(int l=j;l<=now;l++) b[++cnt]=a[l];
			sort(b+1,b+cnt+1);
			for(int l=1;l<=num;l++) c[++size]=b[l];
			j=now;
		}
		if(size<q) continue;
		sort(c+1,c+size+1);
		mini=min(mini,c[q]-a[i]);
	}
	printf("%d\n",mini);
	return 0;
}