#include <bits/stdc++.h>
using namespace std;
long long n, k, q;
long long a[2160];
long long res = 1LL << 40;
long long go(long long x) {
  int cnt = 0;
  vector<int> nums;
  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;
      for (int j = from; j < i; j++) nums.push_back(a[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;
}
