#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000 + 10;
int N, M, Q;
int A[MAXN];
priority_queue<int, vector<int>, greater<int> > q;
int ans = 2147483647;
int main() {
  register int i, j, k;
  int last, cnt;
  scanf("%d%d%d", &N, &M, &Q);
  for (i = 1; i <= N; ++i) scanf("%d", A + i);
  for (i = 1; i <= N; ++i) {
    last = 0;
    cnt = 0;
    for (j = 1; j <= N; ++j) {
      if (A[j] < A[i]) {
        int x = last;
        last = j;
        if (j - x - 1 >= M) {
          for (k = x + 1; k < j; ++k) q.push(A[k]);
          cnt += j - x - 1 - M + 1;
        }
      }
    }
    int x = last;
    last = j;
    if (j - x - 1 >= M) {
      for (k = x + 1; k < j; ++k) q.push(A[k]);
      cnt += j - x - 1 - M + 1;
    }
    if (cnt >= Q) {
      int x = 0, y = 0;
      for (i = 1; i <= Q; ++i) {
        if (i == 1) x = q.top();
        if (i == Q) y = q.top();
        q.pop();
      }
      ans = min(ans, y - x);
    }
    while (!q.empty()) q.pop();
  }
  printf("%d\n", ans);
  return 0;
}
