#include <bits/stdc++.h>
using namespace std;
const int Maxn = 2005;
int n, k, q;
int a[Maxn];
pair<int, int> seq[Maxn];
bool tk[Maxn];
int res = 2000000007;
int main() {
  scanf("%d %d %d", &n, &k, &q);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    seq[i] = pair<int, int>(a[i], i);
  }
  sort(seq, seq + n);
  for (int i = 0; i + q <= n; i++) {
    res = min(res, seq[i + q - 1].first - seq[i].first);
    tk[seq[i].second] = true;
    int lft = 0, cur = 0;
    for (int j = 0; j < n; j++)
      if (tk[j]) {
        lft += max(0, cur - k + 1);
        cur = 0;
      } else
        cur++;
    lft += max(0, cur - k + 1);
    if (lft < q) break;
  }
  printf("%d\n", res);
  return 0;
}
