#include <bits/stdc++.h>
using namespace std;
int parent[2005];
void init() {
  for (int i = 0; i < 2005; i++) parent[i] = i;
}
int root(int i) {
  if (parent[i] == i) return i;
  return parent[i] = root(parent[i]);
}
void unite(int i, int j) {
  int root_i = root(i), root_j = root(j);
  if (root_i == root_j) return;
  parent[root_i] = root_j;
}
bool same(int i, int j) { return root(i) == root(j); }
int N, K, Q;
int A[2005];
bool valid[2005];
vector<pair<int, int> > vec;
int cnt[2005];
int main(void) {
  cin >> N >> K >> Q;
  for (int i = 0; i < N; i++) cin >> A[i];
  init();
  for (int i = 0; i < N; i++) vec.push_back(make_pair(A[i], i));
  sort(vec.begin(), vec.end());
  int ans = 2e9 + 7;
  for (int i = vec.size() - 1; i >= 0; i--) {
    for (int j = 0; j < N; j++) {
      if (!valid[j] && vec[i].first <= A[j]) {
        valid[j] = true;
        if (j < N - 1 && valid[j + 1]) unite(j, j + 1);
        if (j > 0 && valid[j - 1]) unite(j, j - 1);
      }
    }
    for (int j = 0; j < N; j++) cnt[j] = 0;
    for (int j = 0; j < N; j++) {
      if (valid[j]) cnt[root(j)]++;
    }
    int done = 0, tmp = -1;
    for (int j = i; j < vec.size(); j++) {
      if (cnt[root(vec[j].second)] < K) goto ng;
      cnt[root(vec[j].second)]--;
      done++;
      tmp = vec[j].first;
      if (done >= Q) break;
    }
    if (done < Q) goto ng;
    ans = min(ans, tmp - vec[i].first);
  ng:;
  }
  cout << ans << endl;
  return 0;
}
