#include <bits/stdc++.h>
using namespace std;
int n, k, q, tag[2005], a[2005], ans = 2e9;
pair<int, int> lis[2005];
int solve() {
  vector<int> vec, cnt, vec2, vec3;
  for (int i = 1; i <= n + 1; ++i)
    if (tag[i]) vec.push_back(i);
  int tot = 0, mi = 2e9;
  for (int i = 0; i < vec.size() - 1; ++i)
    tot += max(0, vec[i + 1] - vec[i] - k),
        cnt.push_back(max(0, vec[i + 1] - vec[i] - k));
  if (tot < q) return 1;
  for (int i = 0; i < cnt.size(); ++i) {
    if (cnt[i]) {
      vec2.clear();
      for (int j = vec[i] + 1; j < vec[i + 1]; ++j)
        mi = min(mi, a[j]), vec2.push_back(a[j]);
      sort(vec2.begin(), vec2.end());
      for (int j = 0; j < cnt[i]; ++j) vec3.push_back(vec2[j]);
    }
  }
  sort(vec3.begin(), vec3.end());
  ans = min(ans, vec3[q - 1] - vec3[0]);
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) lis[i] = {a[i], i};
  sort(lis + 1, lis + 1 + n);
  tag[n + 1] = 1;
  ans = lis[q].first - lis[1].first;
  for (int i = 1; i <= n; ++i) {
    tag[lis[i].second] = 1;
    if (solve()) break;
  }
  cout << ans << endl;
  return 0;
}
