#include <bits/stdc++.h>
using namespace std;
int n, k, q;
vector<long long> a;
bool f(long long x, long long y) {
  vector<long long> c;
  int d = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] >= x)
      c.push_back(a[i]);
    else {
      if (c.size() < k) {
        c.clear();
        continue;
      }
      sort(c.begin(), c.end());
      auto it = upper_bound(c.begin(), c.end(), x + y);
      it--;
      d += min((int)(it - c.begin() + 1), (int)(c.size() - k + 1));
    }
  }
  if (c.size() >= k) {
    sort(c.begin(), c.end());
    auto it = upper_bound(c.begin(), c.end(), x + y);
    it--;
    d += min((int)(it - c.begin() + 1), (int)(c.size() - k + 1));
  }
  return d >= q;
}
int main() {
  cin >> n >> k >> q;
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<long long> b = a;
  sort(b.begin(), b.end());
  long long ans = 1000000001;
  for (int i = 0; i < n - q; i++) {
    long long minS = 1000000001, maxS = -1;
    while (minS - maxS > 1) {
      int s = (maxS + minS) / 2;
      if (f(b[i], s)) {
        minS = s;
      } else {
        maxS = s;
      }
    }
    ans = min(ans, minS);
  }
  cout << ans << endl;
  return 0;
}
