#include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
int d[202020];
int main()
{
	int num, len, query;
	scanf("%d%d%d", &num, &len, &query);
	for (int i = 0; i < num; i++)scanf("%d", &d[i]);
	int mini = 2020202020;
	d[num] = -2020202020;
	for (int i = 0; i < num; i++)
	{
		int pt = 0;
		vector<int>v;
		for (int j = 0; j <= num; j++)
		{
			if (d[i] > d[j])
			{
				if (j - pt >= len)
				{
					vector<int>t;
					for (int k = pt; k < j; k++)t.push_back(d[k]);
					sort(t.begin(), t.end());
					for (int k = 0; k < j - pt - len + 1; k++)v.push_back(t[k]);
				}
				pt = j + 1;
			}
		}
		sort(v.begin(), v.end());
		if (v.size() >= query)mini = min(mini, v[query - 1] - v[0]);
	}
	printf("%d\n", mini);
}