#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N, K, Q;
  cin >> N >> K >> Q;
  int A[2010];
  for (int i = 0; i < N; i++) cin >> A[i];
  int ans = 2000000000;
  for (int i = 0; i < N; i++) {
    vector<priority_queue<int, vector<int>, greater<int>>> v;
    priority_queue<int, vector<int>, greater<int>> que;
    for (int j = 0; j < N; j++) {
      if (A[j] >= A[i])
        que.push(A[j]);
      else {
        v.push_back(que);
        while (que.size()) que.pop();
      }
    }
    if (que.size()) v.push_back(que);
    vector<int> v2;
    for (auto& e : v) {
      while (e.size() >= K) {
        int p = e.top();
        e.pop();
        v2.push_back(p);
      }
    }
    if (v2.size() >= Q) ans = min(ans, v2[Q - 1] - A[i]);
  }
  cout << ans << endl;
  return 0;
}
