#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll Mod = 1000000007;
const ll INF = Mod * 100LL;
int main() {
  int N, K, Q;
  cin >> N >> K >> Q;
  ll ans = INF;
  vector<ll> A(N);
  vector<pair<ll, int> > As(N);
  set<int> Set;
  Set.insert(-1);
  Set.insert(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    As[i].first = A[i];
    As[i].second = i;
  }
  sort(As.begin(), As.end());
  for (int i = 0; i < N; i++) {
    multiset<ll> Sum;
    int p = 0;
    for (auto itr = next(Set.begin(), 1); p <= i; itr++) {
      p++;
      auto pitr = prev(itr, 1);
      multiset<ll> second;
      for (int j = *pitr + 1; j < *itr; j++) {
        second.insert(A[j]);
      }
      int len = 0;
      int sz = (int)second.size();
      if (*pitr == -1 && *itr == N) {
        len = max(len, sz);
      } else if (*pitr == -1 || *itr == N) {
        len = max(len, sz - K);
      } else {
        len = max(len, sz - K);
      }
      int cnt = 0;
      for (auto itr = second.begin(); cnt < len; itr++) {
        Sum.insert(*itr);
        cnt++;
      }
    }
    if ((int)Sum.size() >= Q) {
      ans = min(ans, *(next(Sum.begin(), Q - 1)) - *(Sum.begin()));
      Set.insert(As[i].second);
    } else {
      break;
    }
  }
  assert(ans != INF);
  cout << ans << endl;
  return 0;
}
