#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
typedef long long Int;


Int n, k, q;
Int a[2160];
Int res = 1LL << 40;

Int go(Int x){
	int cnt = 0;
	vector<int> nums;
	vector<int> tmp;
	for(int i = 0;i < n;i++){
		if(a[i] < x)continue;
		int from = i;
		while(i < n && a[i] >= x)i++;
		if(i - from > k-1){
			cnt += i-from-k+1;
			tmp.clear();
			for(int j = from;j < i;j++)tmp.push_back(a[j]);
			sort(tmp.begin(), tmp.end());
			for(int j = 0;j < i - from - k + 1;j++){
				nums.push_back(tmp[j]);
			}
		}
		i--;
	}
	if(cnt < q)return 1LL<<40;
	sort(nums.begin(), nums.end());
	return nums[q-1] - x;
}

int main(){
	cin >> n >> k >> q;
	for(int i = 0;i < n;i++)cin >> a[i];
	for(int i = 0;i < n;i++){
		res = min(res, go(a[i]));
	}

	cout << res << endl;
	
	return 0;
}