#include<bits/stdc++.h>
#define N 2005
#define inf 1000000000
using namespace std;
int i,j,k,l,s,n,m,v[N],a[N],q[N],id[N],ans;
inline bool cmp(int x,int y) {
	return a[x]<a[y];
}
inline void work(int l,int r) {
	if (l>r) return ;
	int s=0;
	for (int i=l;i<=r;i++) q[++s]=i;
	sort(q+1,q+1+s,cmp);
	for (int i=1;i<=s-k+1;i++) v[q[i]]=1;
}
int main() {
	scanf("%d%d%d",&n,&k,&m);
	for (i=1;i<=n;i++) scanf("%d",&a[i]),id[i]=i;
	sort(id+1,id+1+n,cmp);
	ans=inf;
	for (i=1;i<=n;i++) {
		int L=0;
		for (j=1;j<=n;j++) v[j]=0;
		for (j=1;j<=n;j++) 
			if (a[j]<a[i]) work(L+1,j-1),L=j;
		work(L+1,n);
		s=0;
		for (j=1;j<=n;j++) {
			if (v[id[j]]) s++;
			if (s==m) break;
		}
		if (j<=n) ans=min(ans,a[id[j]]-a[i]);
	}
	printf("%d\n",ans);
}