#include <bits/stdc++.h>
using namespace std;
bool ban[2005];
int N, K, Q, a[2005], rk[2005], sa[2005];
int pre[2005], nxt[2005];
struct Node {
  short sum;
  Node *ch[2];
} * root, w[4005], *tw = w;
template <typename T>
void smin(T &x, T y) {
  if (x > y) x = y;
}
bool cmp(const int &A, const int &B) { return a[A] < a[B]; }
Node *build(short lf, short rg) {
  Node *nd = ++tw;
  if (lf != rg) {
    short mid = (lf + rg) >> 1;
    nd->ch[0] = build(lf, mid);
    nd->ch[1] = build(mid + 1, rg);
  }
  return nd;
}
void reset(Node *nd, short lf, short rg) {
  if (lf != rg) {
    short mid = (lf + rg) >> 1;
    reset(nd->ch[0], lf, mid);
    reset(nd->ch[1], mid + 1, rg);
    nd->sum = nd->ch[0]->sum + nd->ch[1]->sum;
  } else
    nd->sum = !ban[lf];
}
short Query(Node *nd, short lf, short rg, short L, short R) {
  if (L <= lf && rg <= R) return nd->sum;
  short mid = (lf + rg) >> 1, rt = 0;
  if (L <= mid) rt += Query(nd->ch[0], lf, mid, L, R);
  if (R > mid) rt += Query(nd->ch[1], mid + 1, rg, L, R);
  return rt;
}
void set_zero(Node *nd, short lf, short rg, short pos) {
  if (!nd) return;
  nd->sum--;
  short mid = (lf + rg) >> 1;
  if (pos <= mid)
    set_zero(nd->ch[0], lf, mid, pos);
  else
    set_zero(nd->ch[1], mid + 1, rg, pos);
}
void preWork() {
  sort(sa + 1, sa + N + 1, cmp);
  for (int i = 1; i <= N; i++) rk[sa[i]] = i;
  root = build(1, N);
}
void solve() {
  int ans = 1 << 29;
  nxt[N + 1] = N + 1;
  for (int i = 0, cnt, st, ed;; i++) {
    for (int j = 1; j <= i; j++) ban[sa[j]] = true;
    for (int j = 1; j <= N; j++) pre[j] = ban[j] ? j : pre[j - 1];
    for (int j = N; j >= 1; j--) nxt[j] = ban[j] ? j : nxt[j + 1];
    cnt = st = 0, reset(root, 1, N);
    for (int j = i + 1; j <= N && cnt < Q; j++) {
      if (nxt[sa[j]] - pre[sa[j]] - 1 < K) continue;
      if (Query(root, 1, N, pre[sa[j]] + 1, nxt[sa[j]] - 1) >= K) {
        if (!st) st = j;
        if (++cnt == Q)
          ed = j;
        else
          set_zero(root, 1, N, sa[j]);
      }
    }
    if (cnt != Q) break;
    smin(ans, a[sa[ed]] - a[sa[st]]);
    for (int j = 1; j <= i; j++) ban[sa[j]] = false;
  }
  printf("%d", ans);
}
int main() {
  scanf("%d%d%d", &N, &K, &Q);
  for (int i = 1; i <= N; i++) scanf("%d", &a[i]), sa[i] = i;
  preWork();
  solve();
}
