#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, b[2005];
struct data {
  int v, id;
  inline friend bool operator<(data a, data b) { return a.v < b.v; }
} a[2005];
inline void init() {
  n = read();
  m = read();
  q = read();
  for (int i = 1; i <= n; ++i) {
    a[i] = (data){read(), i};
  }
  sort(a + 1, a + n + 1);
}
inline int check(int d) {
  memset(b + 1, 0, n << 2);
  for (int i = 1, j = 1; i <= n; ++i) {
    b[a[i - 1].id] = -1;
    if (a[i].v == a[i - 1].v) continue;
    for (; j <= n && a[j].v <= a[i].v + d;) b[a[j++].id] = 1;
    int s1 = 0, s0 = 0, cnt = 0;
    for (int k = 1; k <= n; ++k) {
      if (!b[k])
        ++s0;
      else if (b[k] == 1)
        ++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;
}
