#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];
  }
  vector<int> candidate;
  for (int i = 0; i < N; i++) {
    vector<int> list;
    vector<int> t;
    for (int j = 0; j < N; j++) {
      if (a[j] < a[i] || i == j) {
        if (t.size() >= K) {
          copy(t.begin(), t.end(), back_inserter(list));
        }
        t.clear();
      } else {
        t.push_back(a[j]);
      }
    }
    if (t.size() >= K) {
      copy(t.begin(), t.end(), back_inserter(list));
    }
    if (list.size() >= Q - 1) {
      sort(list.begin(), list.end());
      candidate.push_back(list[Q - 2] - a[i]);
    }
  }
  int result = *min_element(candidate.begin(), candidate.end());
  cout << result << endl;
}
