#include <bits/stdc++.h>
using namespace std;
long long MOD = 1999;
long long POW(long long a, long long b, long long MMM = MOD) {
  long long ret = 1;
  for (; b; b >>= 1, a = (a * a) % MMM)
    if (b & 1) ret = (ret * a) % MMM;
  return ret;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) {
  if (a == 0 || b == 0) return a + b;
  return a * (b / gcd(a, b));
}
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
int ddx[] = {0, 0, 1, 1, 1, -1, -1, -1}, ddy[] = {1, -1, 1, 0, -1, 1, 0, -1};
int a[2005], sum[2005], chk[2005];
int n, k, q;
bool cnt(int l, int r) {
  for (int(i) = (1); (i) <= (n); (i) += (1)) {
    if (l <= a[i] && a[i] <= r)
      chk[i] = 1;
    else if (a[i] < l)
      chk[i] = -3000;
    else
      chk[i] = 0;
    sum[i] = sum[i - 1] + chk[i];
  }
  int res = 0, long long = 0, temp = 0;
  for (int(i) = (k); (i) <= (n); (i) += (1)) {
    if (sum[i] - sum[long long] < 0) {
      long long = i;
      temp = 0;
    }
    if (i - long long >= k) {
      if (sum[i] - sum[long long] > temp) {
        res++;
        temp++;
      } else if (sum[i] - sum[long long] < 0) {
        long long = i;
        temp = 0;
      }
    }
  }
  return res >= q;
}
bool ok(int m) {
  for (int(ii) = (1); (ii) <= (n); (ii) += (1)) {
    int l = a[ii], r = a[ii] + m;
    if (cnt(l, r)) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int(i) = (1); (i) <= (n); (i) += (1)) scanf("%d", a + i);
  int l = 0, r = (int)1e9;
  while (l <= r) {
    int m = (l + r) >> 1;
    if (ok(m))
      r = m - 1;
    else
      l = m + 1;
  }
  printf("%d", l);
}
