#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  std::vector<int> a(n);
  std::vector<std::pair<int, int>> vec;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    vec.push_back({a[i], i});
  }
  sort(begin(vec), end(vec));
  int ans = vec[q - 1].first - vec[0].first;
  std::vector<int> pos;
  pos.push_back(0);
  pos.push_back(n);
  for (int i = 0; i < n - q; i++) {
    pos.push_back(vec[i].second);
    sort(begin(pos), end(pos));
    long Count = 0;
    for (int i = 0; i < pos.size() - 1; i++) {
      int D = pos[i + 1] - pos[i] - 1;
      if (D >= k) Count += D - k + 1;
    }
    if (Count < q) break;
    ans = std::min(ans, vec[i + q].first - vec[i + 1].first);
  }
  cout << ans << endl;
  return 0;
}
