#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, mo = 1e9 + 7;
template <typename A, typename B>
inline bool upmx(A &x, const B &y) {
  return x < y ? x = y, 1 : 0;
}
template <typename A, typename B>
inline bool upmn(A &x, const B &y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
inline T gcd(T x, T y) {
  for (; y; swap(x, y)) x %= y;
  return x;
}
inline int Pow(int a, int b, int p = mo) {
  int r = 1;
  for (; b; b >>= 1, a = 1ll * a * a % p)
    if (b & 1) r = 1ll * r * a % p;
  return r;
}
const int N = 2011;
int a[N], n, b[N], K, Q;
inline bool cmp(int i, int j) { return a[i] < a[j]; }
int c[N];
int chk(int m) {
  for (int i = (1), i_end = (n - Q + 1); i <= i_end; ++i) {
    memset(c, 0, sizeof c);
    for (int j = (i), j_end = (n); j <= j_end; ++j) {
      if (a[b[j]] > a[b[i]] + m)
        c[b[j]] = -1;
      else
        c[b[j]] = 1;
    }
    int res = 0, l = 0, t = 0;
    for (int j = (1), j_end = (n + 1); j <= j_end; ++j) {
      if (!c[j]) {
        res += max(0, min(j - l - K, t));
        l = i, t = 0;
      } else if (c[j] > 0)
        ++t;
    }
    if (res >= Q) return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> K >> Q;
  int l = inf, r = -inf;
  for (int i = (1), i_end = (n); i <= i_end; ++i) {
    cin >> a[i];
    upmx(r, a[i]);
    upmn(l, a[i]);
    b[i] = i;
  }
  sort(b + 1, b + n + 1, cmp);
  r -= l, l = 0;
  for (; l < r;) {
    int m = l + r >> 1;
    if (chk(m))
      r = m;
    else
      l = m + 1;
  }
  cout << l;
}
