#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int MN = 2005, inf = 1e9;
int N, K, Q;
int id[MN], a[MN];
bool cmp(const int& x, const int& y) { return a[x] < a[y]; }
int solve(int pos) {
  static int bel[MN], l[MN], r[MN], len[MN], cnt, bl;
  static bool in[MN];
  memset(len, 0, sizeof len);
  memset(in, 0, sizeof in);
  cnt = bl = 0;
  register int i, j, k;
  for (i = 0; i <= N; ++i) {
    for (; i <= N && a[i] < a[pos]; ++i)
      ;
    for (j = i; j <= N && a[j] >= a[pos]; ++j)
      ;
    j = min(j, N);
    if (j - i < K) {
      i = j;
      continue;
    }
    for (++bl, k = i; k <= j; ++k)
      l[k] = i, r[k] = j, bel[k] = bl, ++len[bl], in[k] = true;
    i = j;
  }
  for (i = 1; i <= N; ++i)
    if (in[id[i]]) {
      if (len[bel[id[i]]] == K)
        for (j = l[id[i]]; j <= r[id[i]]; ++j) in[j] = false;
      --len[bel[id[i]]];
      if (++cnt == Q) break;
    }
  if (cnt < Q) return inf;
  return a[id[i - 1]] - a[pos];
}
int main() {
  N = read();
  K = read();
  Q = read();
  register int i;
  for (i = 1; i <= N; ++i) a[id[i] = i] = read();
  sort(id + 1, id + N + 1, cmp);
  int ans = inf;
  for (i = 1; i <= N; ++i) ans = min(ans, solve(i));
  return 0 * printf("%d\n", ans);
}
