#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int N, K, Q, A[100009], minx = (1 << 30); bool P[100009];

int solve(int B) {
	for (int i = 1; i <= N; i++) {
		if (A[i] < B) P[i] = true; else P[i] = false;
	}
	vector<int>S, T;
	for (int i = 1; i <= N + 1; i++) {
		if (P[i] == true || i == N + 1) {
			sort(T.begin(), T.end());
			if (T.size() >= K) { for (int j = 0; j < T.size() - K + 1; j++) S.push_back(T[j]); }
			T.clear();
		}
		else {
			T.push_back(A[i]);
		}
	}
	sort(S.begin(), S.end());
	if (S.size() < Q) return (1 << 30);
	return S[Q - 1] - S[0];
}

int main() {
	cin >> N >> K >> Q;
	for (int i = 1; i <= N; i++) cin >> A[i];
	for (int i = 1; i <= N; i++) {
		minx = min(minx, solve(A[i]));
	}
	cout << minx << endl;
	return 0;
}