#include <bits/stdc++.h>
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
int main() {
  int N, K, Q;
  cin >> N >> K >> Q;
  vector<int> A(N + 1);
  for (int i = 0; i < (N); i++) cin >> A[i];
  A[N] = 0;
  int ans = 1000000000;
  for (int loop1 = 0; loop1 < (N); loop1++) {
    int minimum = A[loop1];
    vector<int> canuse;
    {
      priority_queue<int, vector<int>, greater<int>> que;
      int l = 0;
      for (int r = 0; r < (N + 1); r++) {
        if (A[r] < minimum) {
          if (r - l >= K) {
            for (int i = l; i < r; i++) que.push(A[i]);
            for (int i = 0; i < r - l - K + 1; i++) {
              canuse.push_back(que.top());
              que.pop();
            }
          }
          l = r + 1;
        }
      }
    }
    if (canuse.size() >= Q) {
      sort(canuse.begin(), canuse.end());
      chmin(ans, canuse[Q - 1] - minimum);
    }
  }
  cout << ans << endl;
  return 0;
}
