#include <bits/stdc++.h>
using namespace std;
struct ad {
  int x, id;
  friend bool operator<(ad A, ad B) { return A.x < B.x; }
} B[2005];
int N, K, Q, Ans = 2e9;
int A[2005], id[2005], DMn[2005];
bool vis[2005];
inline bool cmp(int x, int y) { return A[x] < A[y]; }
inline void work(int x) {
  int L = x - 1, R = x + 1;
  while ((A[L] >= A[x]) && L > 0) L--;
  while ((A[R] >= A[x]) && R <= N) R++;
  L++;
  R--;
  if (R - L + 1 >= K)
    DMn[x] = A[x];
  else
    DMn[x] = min(DMn[L - 1], DMn[R + 1]);
}
int main() {
  scanf("%d%d%d", &N, &K, &Q);
  for (int i = 1; i <= N; i++)
    scanf("%d", &A[i]), B[i].x = A[i], B[i].id = id[i] = i;
  sort(id + 1, id + 1 + N, cmp);
  DMn[0] = DMn[N + 1] = 2e9;
  for (int i = 1; i <= N; i++) work(id[i]);
  for (int i = 1; i <= N - Q + 1; i++) {
    int Res = B[i + Q - 1].x - B[i].x;
    for (int j = 1; j < Q; j++) {
      if (DMn[B[id[i + j]].id] < B[i].x) break;
      if (j == Q - 1) Ans = min(Ans, Res);
    }
  }
  printf("%d\n", Ans);
  return 0;
}
