#include <bits/stdc++.h>
using namespace std;

const int MAXN = 2e3 + 5;

int N, K, Q;
int a[MAXN];

void load() {
	scanf("%d%d%d", &N, &K, &Q);
	for (int i = 0; i < N; i++)
		scanf("%d", a + i);
}

bool check(int diff) {
	for (int i = 0; i < N; i++) {
		int block = 0, cnt = 0, taken = 0;		
		for (int j = 0; j <= N; j++)
			if (a[j] < a[i]) {
				taken += min(cnt, max(block - K + 1, 0));
				block = cnt = 0;
			}
			else {
				block++;
				cnt += a[j] <= a[i] + diff;
			}
		if (taken >= Q)
			return true;
	}
	return false;
}

int solve() {
	int lo = 0, hi = 1e9;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		if (check(mid))
			hi = mid;
		else
			lo = mid + 1;
	}
	return lo;
}

int main() {
	load();
	printf("%d\n", solve());
	return 0;
}