#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K, Q;
  cin >> N >> K >> Q;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int answer =
      *max_element(A.begin(), A.end()) - *min_element(A.begin(), A.end());
  for (int s = 0; s < N; s++) {
    vector<pair<int, int>> ps;
    for (int i = 0; i < N; i++) {
      ps.push_back(make_pair(A[i], i));
    }
    sort(ps.begin(), ps.end());
    deque<pair<int, int>> queue;
    set<int> indexes;
    vector<int> gets;
    for (int i = 0; i < N; i++) {
      while (queue.size() > 0 && queue.front().first < ps[i].first) {
        auto p = queue.front();
        queue.pop_front();
        indexes.insert(p.second);
      }
      auto it = indexes.lower_bound(ps[i].second);
      const int right = (it != indexes.end() ? *it : 2 * N);
      const int left = (it != indexes.begin() ? *(--it) : -2 * N);
      if (i >= s && abs(ps[i].second - left) >= K ||
          abs(ps[i].second - right) >= K) {
        gets.push_back(ps[i].first);
      } else {
        queue.push_back(ps[i]);
      }
      if (gets.size() == Q) {
        break;
      }
    }
    if (gets.size() == Q) {
      answer = min(answer, gets[Q - 1] - gets[0]);
    }
  }
  cout << answer << endl;
}
