#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int num = 0;
  char c = getchar();
  if (c == '-') return -read();
  while (c >= '0' && c <= '9') {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num;
}
inline long long READ() {
  long long num = 0;
  char c = getchar();
  if (c == '-') return -READ();
  while (c >= '0' && c <= '9') {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num;
}
int n, k, q;
int a[2007];
pair<int, int> as[2007];
vector<int> qus;
int ql[2007];
int minx = ((int)0x7f7f7f7f);
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    as[i] = make_pair(a[i], i);
  }
  sort(as + 1, as + n + 1);
  for (int i = 1; i <= n; i++) {
    qus.resize(0);
    qus.push_back(0);
    for (int j = 1; j <= n; j++) {
      int k = lower_bound(as + 1, as + n + 1, make_pair(a[j], 0)) - as;
      if (k < i) {
        qus.push_back(k);
        ql[((int)(qus).size()) - 1] =
            qus[((int)(qus).size()) - 1] - qus[((int)(qus).size()) - 2] - 1;
      }
      ql[((int)(qus).size())] = n - qus[((int)(qus).size()) - 1];
    }
    int kk = 0, ll = i;
    for (int jj = i; kk < q && jj <= n; jj++) {
      int j = as[jj].second;
      int kei = lower_bound((qus).begin(), (qus).end(), j) - qus.begin();
      if (ql[kei] >= k) {
        kk++;
        ll = jj;
        ql[kei]--;
      }
    }
    if (kk < q) continue;
    minx = min(minx, as[ll].first - as[i].first);
  }
  printf("%d\n", minx);
  return 0;
}
