#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5, INF = 1e9;
int n, k, q, cntc, a[maxn], b[maxn], dable[maxn], ans = INF;
int fa[maxn], len[maxn];
struct Node {
  int v, id;
} c[maxn];
bool cmp(const Node &a, const Node &b) { return a.v < b.v; }
int main() {
  scanf("%d%d%d", &n, &k, &q);
  int x, cnt, minm, t;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; ++i) {
    x = b[i];
    memset(dable, 0, sizeof(dable));
    memset(fa, 0, sizeof(fa));
    cntc = 0;
    t = 1;
    for (int j = 1; j <= n; ++j)
      if (a[j] < x) dable[j] = 1;
    for (int j = 1; j <= n; ++j) {
      if (!dable[j]) fa[j] = t, c[++cntc].v = a[j], c[cntc].id = j;
      if (dable[j]) len[t] = j - t, t = j + 1;
    }
    len[t] = n + 1 - t;
    sort(c + 1, c + cntc + 1, cmp);
    cnt = 1;
    for (int j = 1; cnt <= q && j <= cntc; ++j) {
      if (len[fa[c[j].id]] < k) continue;
      --len[fa[c[j].id]];
      minm = c[j].v;
      ++cnt;
    }
    if (cnt <= q) break;
    ans = min(ans, minm - x);
  }
  printf("%d\n", ans);
  return 0;
}
