#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, q;
  cin >> n >> k >> q;
  vector<pair<long long, long long>> v;
  for (long long(i) = (0); (i) < (n); ++i) {
    long long tmp;
    cin >> tmp;
    v.push_back(make_pair(tmp, i));
  }
  vector<bool> ok(n);
  sort(v.begin(), v.end());
  long long ans = v[q - 1].first - v[0].first;
  for (long long(i) = (0); (i) < (n); ++i) {
    vector<long long> place;
    place.push_back(-1);
    place.push_back(n);
    for (int j = 0; j <= i; j++) place.push_back(v[j].second);
    vector<long long> seica;
    for (long long j = i; j < n; j++) {
      auto it = lower_bound(place.begin(), place.end(), v[j].second);
      if (*it - *(it - 1) - 1 >= k) {
        seica.push_back(v[j].first);
        place.push_back(v[j].second);
      }
    };
    ;
    if (seica.size() < q) break;
    ;
    ;
    ans = min(ans, seica[q - 1] - seica[0]);
  }
  cout << ans << endl;
  return 0;
}
