#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  for (; c < 48 || c > 57; c = getchar())
    if (c == '-') f = -1;
  for (; c > 47 && c < 58; c = getchar()) x = x * 10 + c - 48;
  return x * f;
}
int n, m, q, a[2005];
inline void init() {
  n = read();
  m = read();
  q = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
}
inline int check(int d) {
  for (int i = 1; i <= n; ++i) {
    int s0 = 0, s1 = 0, cnt = 0;
    for (int j = 1; j <= n; ++j)
      if (a[j] > a[i] + d)
        ++s0;
      else if (a[j] >= a[i])
        ++s1;
      else {
        cnt += max(0, min(s1 + s0 - m + 1, s1));
        s1 = s0 = 0;
      }
    cnt += max(0, min(s1 + s0 - m + 1, s1));
    if (cnt >= q) return 1;
  }
  return 0;
}
inline void solve() {
  int l = 1, r = 1e9, mid, ans;
  while (l <= r) {
    mid = l + r >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  printf("%d\n", ans);
}
int main() {
  init();
  solve();
  return 0;
}
