#include<cstdio>
#include<queue>
#include<algorithm>
using namespace std;
const int MAXN = 2000;
const int INF = (1<<30);
int A[MAXN + 5];
priority_queue<int, vector<int>, greater<int> >q1, q2;
int main() {
	int N, K, Q, ans = INF;
	scanf("%d%d%d", &N, &K, &Q);
	for(int i=1;i<=N;i++)
		scanf("%d", &A[i]);
	for(int i=1;i<=N;i++) {
		int le = 1;
		for(int j=1;j<=N+1;j++) {
			if( A[j] < A[i] ) {
				int len = j - le;
				for(int k=K;k<=len;k++) {
					q2.push(q1.top());
					q1.pop();
				}
				le = j+1;
				while( !q1.empty() )
					q1.pop();
			}
			else q1.push(A[j]);
		}
		if( q2.size() >= Q ) {
			for(int j=1;j<Q;j++)
				q2.pop();
			ans = min(ans, q2.top() - A[i]);
		}
		while( !q2.empty() )
			q2.pop();
	}
	printf("%d\n", ans);
}