#include <bits/stdc++.h>
using namespace std;
long long n, k, q;
vector<long long> v;
vector<long long> vs;
long long d[2100];
long long dd[2100];
long long f(long long p) {
  long long mx = 0;
  for (long long i = (0); i < (vs.size()); ++i) {
    memset((d), (0), sizeof(d));
    memset((dd), (0), sizeof(dd));
    long long l = vs[i];
    long long h = vs[i] + p;
    d[0] = -1;
    d[n + 1] = -1;
    d[n + 2] = -1;
    for (long long j = (0); j < (v.size()); ++j) {
      if (v[j] < l) {
        d[j + 1] = -1;
      } else if (h < v[j]) {
        d[j + 1] = 0;
      } else {
        d[j + 1] = 1;
      }
    }
    for (long long i = (0); i < (n + 2); ++i) {
      if (d[i] == 1) {
        dd[i] = 1;
      }
    }
    for (long long i = (1); i < (n + 2); ++i) {
      dd[i] += dd[i - 1];
    }
    long long ret = 0;
    long long index1 = 1;
    long long index2 = 0;
    long long c = 0;
    while (1) {
      if (!(d[index1 - 1] == -1 && d[index1] != -1)) {
        index1++;
        if (index1 > n + 1) break;
        continue;
      }
      if (!(d[index2] != -1 && d[index2 + 1] == -1)) {
        index2++;
        if (index2 > n + 1) break;
        continue;
      }
      long long a1 = index2 - index1 + 1;
      long long b1 = dd[index2] - dd[index1 - 1];
      c += min(a1 - k + 1, b1);
      index2++;
      index1 = index2;
      if (index2 > n + 1) break;
    }
    mx = max(mx, c);
  }
  if (mx >= q) {
    return 1;
  } else {
    return 0;
  }
}
int main() {
  cin >> n >> k >> q;
  for (long long i = (0); i < (n); ++i) {
    long long a;
    cin >> a;
    v.push_back(a);
  }
  vs = v;
  sort((vs).begin(), (vs).end());
  long long low = 0;
  long long high = 1000000000;
  while (low < high) {
    long long mid = (high + low) >> 1;
    if (f(mid) == 1) {
      high = mid;
    } else {
      low = mid + 1;
    }
  }
  cout << low << endl;
  return 0;
}
