#include <bits/stdc++.h>
using namespace std;
int n, k, q, a[2005], sz[2005], reg[2005], tot, ans = 1000000000, fb[2005];
vector<pair<int, int> > v;
void forbid(int ind) {
  for (int i = max(0, v[ind].second - k + 1); i <= v[ind].second; i++) {
    fb[i] = 1;
  }
}
bool valid(int plc) {
  if (!reg[plc] || sz[reg[plc]] < k) return false;
  return true;
}
int main() {
  scanf("%d %d %d", &n, &k, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    v.push_back({a[i], i});
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < (int)v.size() - q + 1; i++) {
    memset(sz, 0, sizeof(sz));
    memset(reg, 0, sizeof(reg));
    tot = 0;
    for (int j = 1; j <= n; j++) {
      if (fb[j]) continue;
      ++tot;
      int tut = j;
      while (j + 1 <= n && !fb[j + 1]) {
        reg[j] = tot;
        j++;
      }
      sz[tot] = j - tut + 1;
      reg[j] = tot;
    }
    int flag = 0;
    for (int j = i; j <= i + q - 1; j++) {
      if (valid(v[j].second)) {
        sz[reg[v[j].second]]--;
      } else {
        flag = 1;
        break;
      }
    }
    if (!flag) ans = min(ans, v[i + q - 1].first - v[i].first);
    forbid(i);
  }
  printf("%d", ans);
}
