#include <bits/stdc++.h>
#define F(i,a,b) for(int i=(a);i<=(b);++i)
#define F_(i,a,b) for(int i=(a);i>=(b);--i)
#define G(i,u) for(int i=head[u];i;i=nxt[i])

template<typename T> inline T max(T& a, T b) { return a>b?a:a=b; }
template<typename T> inline T min(T& a, T b) { return a<b?a:a=b; }

const int N = 2005;

int a[N], b[N], c[N], ans;

int main() {
	ans = 0x7fffffff;
	int n, k, q;
	scanf("%d%d%d", &n, &k, &q);
	F(i,1,n) scanf("%d", &a[i]);
	F(i,1,n) {
		int x = a[i], tot = 0;
		F(j,1,n) {
			int st = j, siz = 0;
			if(a[st] < x) continue;
			b[siz++] = a[st];
			while(j<n && a[j+1]>=x) b[siz++] = a[++j];
			std::sort(b,b+siz);
			for(int l = 0; l <= siz-k; ++ l) c[tot++] = b[l];
		}
		std::sort(c,c+tot);
		if(q <= tot) ans = std::min(ans,c[q-1]-x);
	}
	printf("%d\n", ans);
	return 0;
}