#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e18;
const long long MOD = 1e9 + 7;
long long binarySearch(function<bool(long long)> check, long long ok,
                       long long ng) {
  while ((ok - ng > 1) || (ng - ok > 1)) {
    long long mid = (ok + ng) / 2;
    if (check(mid))
      ok = mid;
    else
      ng = mid;
  }
  return ok;
}
long long N, K, Q;
long long A[2010];
bool Check(long long diff) {
  for (long long i = 0; i < N; i++) {
    long long deleteCnt = 0;
    long long nowSize = 0;
    long long inRangeCnt = 0;
    for (long long j = 0; j < N; j++) {
      if (A[i] <= A[j]) {
        nowSize++;
        if (A[j] <= A[i] + diff) inRangeCnt++;
      } else {
        deleteCnt += max(0ll, min((nowSize + 1 - K), inRangeCnt));
        nowSize = 0;
      }
    }
    deleteCnt += max(0ll, min((nowSize + 1 - K), inRangeCnt));
    if (deleteCnt >= Q) return false;
  }
  return true;
}
int main() {
  cin >> N >> K >> Q;
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
  }
  cout << binarySearch(Check, -1, INF) + 1 << endl;
  return 0;
}
