#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 nearMin[2010];
long long A[2010];
long long NearMin(long long n) {
  long long cnt = 1;
  long long ret = INF;
  long long nowL = n - 1;
  long long nowR = n + 1;
  while (cnt < K) {
    long long l = ((nowL < 0) ? 0 : A[nowL]);
    long long r = ((nowR > N - 1) ? 0 : A[nowR]);
    if (l > r) {
      ret = min(ret, l);
      if (l >= A[n]) cnt++;
      nowL--;
    } else {
      ret = min(ret, r);
      if (r >= A[n]) cnt++;
      nowR++;
    }
    if (nowL < 0 && nowR > N - 1) return 0;
  }
  return ret;
}
bool Check(long long diff) {
  for (long long i = 0; i < N; i++) {
    if (nearMin[i] < A[i]) continue;
    long long cnt = 0;
    for (long long j = 0; j < N; j++) {
      if (A[j] >= A[i] && A[j] - A[i] <= diff && nearMin[j] >= A[i]) {
        cnt++;
      }
    }
    if (cnt >= Q) return false;
  }
  return true;
}
int main() {
  cin >> N >> K >> Q;
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (long long i = 0; i < N; i++) {
    nearMin[i] = NearMin(i);
  }
  cout << binarySearch(Check, -1, INF) + 1 << endl;
  return 0;
}
