#include <bits/stdc++.h>
using namespace std;
int n,K,Q,a[2005],L,R,M;
int main(){
	scanf("%d%d%d",&n,&K,&Q);
	for (int i=1;i<=n;++i) scanf("%d",&a[i]);
	L=0; R=1000000000;
	while (L<R){
		M=(L+R)/2;
		int fl=0;
		for (int i=1;i<=n;++i){
			int p=a[i];
			int k=0,tmp=0,s=0;
			for (int j=1;j<=n+1;++j)
			if (a[j]<p||j==n+1){
				tmp+=j-k-1<K?0:min(j-k-1-K+1,j-k-1-s); k=j; s=0;
			}else
			if (a[j]>p+M) ++s;
			if (tmp>=Q) {fl=1; break;}
		}
		if (fl) R=M; else L=M+1;
	}
	printf("%d\n",L);
}