#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];
bool chk[2005];
int n, k, q;
bool cnt(int l, int r) {
  memset(chk, 0, sizeof(chk));
  ;
  int res = 0;
  set<pair<int, int> > S;
  int long long = 1;
  for (int(i) = (1); (i) <= (k - 1); (i) += (1)) S.insert(make_pair(a[i], i));
  for (int(i) = (k); (i) <= (n); (i) += (1)) {
    S.insert(make_pair(a[i], i));
    if (S.size() == k) {
      auto it = S.begin();
      int t = it->first;
      if (l <= t && t <= r) {
        res++;
        if (res == q) return 1;
        chk[it->second] = 1;
        S.erase(it);
      }
      while (S.size() >= k) {
        if (!chk[long long])
          S.erase(S.find(make_pair(a[long long], long long)));
        long long ++;
      }
    }
  }
  return 0;
}
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);
}
