#include <bits/stdc++.h>
using namespace std;
bool possible(int n, const vector<bool> &to_remove,
              const vector<bool> &to_avoid, int k) {
  int nremove = 0;
  int last_to_avoid = -1;
  for (int i = 0; i <= n; ++i) {
    if (i == n || to_avoid[i]) {
      int space = (i - 1) - (last_to_avoid + 1) + 1;
      if (space - nremove < k - 1) return false;
      nremove = 0;
      last_to_avoid = i;
    } else {
      if (to_remove[i]) ++nremove;
    }
  }
  return true;
}
int main() {
  int n, k, nq;
  scanf("%d %d %d", &n, &k, &nq);
  vector<int> values(n);
  for (int i = 0; i < n; ++i) scanf("%d", &values[i]);
  vector<pair<int, int>> values_and_ids;
  for (int i = 0; i < n; ++i) {
    values_and_ids.emplace_back(values[i], i);
  }
  sort(values_and_ids.begin(), values_and_ids.end());
  int best_result = INT_MAX;
  for (int left = 0; left + nq - 1 < n; ++left) {
    const int right = left + nq - 1;
    int cand_res = values_and_ids[right].first - values_and_ids[left].first;
    if (cand_res >= best_result) continue;
    vector<bool> to_remove(n, false), to_avoid(n, false);
    for (int i = 0; i < left; ++i) to_avoid[values_and_ids[i].second] = true;
    for (int i = left; i <= right; ++i)
      to_remove[values_and_ids[i].second] = true;
    if (possible(n, to_remove, to_avoid, k))
      best_result = min(best_result, cand_res);
  }
  printf("%d\n", best_result);
  return 0;
}
