#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int n, K, Q;
vector<int> A, B, C;
int main() {
  scanf("%d %d %d", &n, &K, &Q);
  A.resize(n + 1), B.resize(n + 1);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
  }
  int ans = 1e9 + 7;
  for (int i = 1; i <= n; i++) {
    C.clear();
    int lb = A[i];
    int lp = i, rp = i;
    while (lp > 1 && A[lp - 1] >= lb) lp--;
    while (rp < n && A[rp + 1] >= lb) rp++;
    if (rp - lp + 1 < K) continue;
    lp = rp = 1;
    int cnt = 1;
    while (lp <= n) {
      while (A[lp] < lb && lp <= n) lp++;
      if (lp > n) break;
      rp = lp;
      while (A[rp + 1] >= lb && rp < n) rp++;
      int width = rp - lp + 1;
      if (width >= K) {
        for (int i = 1, j = lp; j <= rp; j++, i++) B[i] = A[j];
        sort(B.begin() + 1, B.begin() + 1 + width);
        for (int i = 1; i <= width - K + 1; i++) {
          if (cnt && B[i] == lb)
            cnt--;
          else
            C.push_back(B[i]);
        }
      }
      lp = rp + 1;
    }
    if (C.size() < Q - 1) continue;
    sort(C.begin(), C.end());
    ans = min(ans, C[Q - 2] - lb);
  }
  printf("%d\n", ans);
  return 0;
}
