#include <bits/stdc++.h>
using namespace std;
const int INF=(2e9);
const int maxn=2010;
int n,k,q,a[maxn],ans,b[maxn],res[maxn];
int solve(int x) {
	int s=-1,sz=0;
	for (int i=1;i<=n+1;i++)
		if (a[i]>=a[x]) {
			if (s==-1) s=i;
		}
		else if (s!=-1) {
			if (i-s>=k) {
				for (int j=s;j<i;j++) b[j-s+1]=a[j];
				sort(b+1,b+(i-s+1));
				for (int j=1;j+k-1<=i-s;j++) res[++sz]=b[j];
			}
			s=-1;
		}
	if (sz<q) return INF;
	sort(res+1,res+(sz+1));
	return res[q]-a[x];
}
int main() {
	//freopen("1.txt","r",stdin);
	scanf("%d %d %d",&n,&k,&q);
	for (int i=1;i<=n;i++) scanf("%d",&a[i]);
	ans=INF;
	for (int i=1;i<=n;i++) ans=min(ans,solve(i));
	printf("%d\n",ans);
	return 0;
}