#include <bits/stdc++.h>
using namespace std;
signed main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N, K, Q;
  cin >> N >> K >> Q;
  long long A[2010];
  long long ans = 1000000000000000000;
  for (long long i = 0; i < N; i++) cin >> A[i];
  for (long long i = 0; i < N; i++) {
    vector<long long> all;
    for (long long j = 0; j < N; j++) {
      vector<long long> v;
      while (A[j] >= A[i]) v.push_back(A[j++]);
      if (v.size() < K) continue;
      sort(v.begin(), v.end());
      for (long long k = 0; k < v.size() - K + 1; k++) {
        all.push_back(v[k]);
      }
    }
    sort(all.begin(), all.end());
    if (all.size() >= Q) {
      ans = min(ans, all[Q - 1] - all[0]);
    }
  }
  cout << ans << endl;
  return 0;
}
