#include <bits/stdc++.h>
int main() {
  int n, k, q;
  std::cin >> n >> k >> q;
  std::vector<int> a(n);
  for (int ni = 0; ni < n; ++ni) std::cin >> a[ni];
  int ans = 1e9;
  for (int yi = 0; yi < n; ++yi) {
    int y = a[yi];
    int left = 0;
    int count = 0;
    std::vector<int> uppers;
    for (int ni = 0; ni <= n; ++ni) {
      if (ni == n or a[ni] > y) {
        count += std::max(0, ni - left - k + 1);
        left = ni;
      } else {
        uppers.push_back(a[ni]);
      }
    }
    if ((int)uppers.size() < q) continue;
    std::sort(uppers.begin(), uppers.end());
    ans = std::min(ans, uppers[q - 1] - uppers[0]);
  }
  std::cout << ans << std::endl;
  return 0;
}
