#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <math.h>
#include <vector>
#include <queue>
using namespace std;

const int MAXN = 2000 + 10;
int N, M, Q;
int A[MAXN];
int l, r, mid;

int main() {
	register int i, j;
	scanf( "%d%d%d", &N, &M, &Q );
	for( i = 1; i <= N; ++i ) scanf( "%d", A + i );
	l = 0, r = 2000000000;
	while(l < r) {
		int mid = (l + r) >> 1; bool ok = 0;
		for( i = 1; i <= N; ++i ) {
			int p = A[i];
			int k = 0, tmp = 0, cnt = 0;
			for(j = 1; j <= N + 1; ++j)
				if(A[j] < p || j == N + 1)
					tmp += j - k - 1 < M ? 0 : min(j - k - 1 - M + 1, j - k - 1 - cnt), k = j, cnt = 0;
				else
					if(A[j] > p + mid) ++cnt;
			if(tmp >= Q) {
				ok = 1;
				break;
			}
		}
		ok ? r = mid : l = mid + 1;
	}
	printf( "%d\n", l );
	return 0;
}