#include <bits/stdc++.h>
using namespace std;
int A[2005];
int main() {
  int N, K, Q;
  scanf("%d%d%d", &N, &K, &Q);
  for (int i = 0; i < N; ++i) {
    scanf("%d", &A[i]);
  }
  int ans = INT_MAX;
  for (int i = 0; i < N; ++i) {
    vector<int> take;
    vector<int> L;
    for (int j = 0; j <= N; ++j) {
      if (j < N && A[j] >= A[i]) {
        L.push_back(A[j]);
      } else {
        if (L.size() < K) continue;
        int pos = L.size() - K + 1;
        nth_element(L.begin(), L.begin() + pos, L.end());
        take.insert(take.end(), L.begin(), L.begin() + pos);
        L.clear();
      }
    }
    sort(take.begin(), take.end());
    if (take.size() < Q) continue;
    int val = take[Q - 1] - A[i];
    ans = min(ans, val);
  }
  printf("%d\n", ans);
}
