#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 11;
int n, k, q, cnt, ans;
int a[N], b[N], c[N], bl[N], sz[N], id[N];
inline bool cmp(int x, int y) { return a[x] < a[y]; }
inline void build() {
  cnt = 1;
  for (register int i = 1; i <= n; ++i) sz[i] = 0;
  for (register int i = 1; i <= n; ++i)
    if (c[i])
      ++cnt;
    else {
      bl[i] = cnt;
      ++sz[cnt];
    }
}
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (register int i = 1; i <= n; ++i) scanf("%d", a + i), id[i] = i;
  ans = 1e9 + 1;
  sort(id + 1, id + n + 1, cmp);
  for (register int i = 1; i <= n; ++i) {
    build();
    int top = i, j;
    for (j = 1; j <= q; ++j) {
      while (top <= n && sz[bl[id[top]]] < k) ++top;
      if (top > n) break;
      --sz[bl[id[top]]];
      ++top;
    }
    --top;
    if (j == q + 1 && top <= n) {
      ans = min(ans, a[id[top]] - a[id[i]]);
    }
    c[id[i]] = 1;
  }
  printf("%d\n", ans);
  return 0;
}
