#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
bool chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
const int maxn = 2000 + 10;
const int inf = 0x7fffffff;
int n, m, q;
int N, Ans = inf;
int a[maxn], b[maxn], c[maxn];
inline void file() {
  freopen("ARC098E.in", "r", stdin);
  freopen("ARC098E.out", "w", stdout);
}
inline int read() {
  int x = 0, p = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c - '0');
    c = getchar();
  }
  return x * p;
}
inline int solve(int p) {
  int l = 1;
  N = 0;
  for (int r = (int)1; r <= (int)n + 1; ++r) {
    if (a[r] < a[p]) {
      int len = r - l;
      if (len >= m) {
        for (int i = (int)l; i <= (int)r - 1; ++i) b[i - l + 1] = a[i];
        sort(b + 1, b + len + 1);
        for (int i = (int)1; i <= (int)len - m + 1; ++i) c[++N] = b[i];
      }
      if (l) l = r + 1;
    }
  }
  if (N < q) return inf;
  return c[q] - a[p];
}
int main() {
  n = read();
  m = read();
  q = read();
  for (int i = (int)1; i <= (int)n; ++i) a[i] = read();
  for (int i = (int)1; i <= (int)n; ++i) chkmin(Ans, solve(i));
  printf("%d", Ans);
  return 0;
}
