#include <bits/stdc++.h>
using namespace std;
long long N, K, Q;
vector<long long> A;
long long f(long long x) {
  vector<vector<long long>> arr;
  {
    vector<long long> cur;
    for (long long i = 0; i < (long long)N; ++i) {
      if (A[i] < x and cur.size()) {
        if (cur.size() >= K) arr.push_back(cur);
        cur = vector<long long>();
      } else {
        cur.push_back(A[i]);
      }
    }
    if (cur.size() >= K) {
      arr.push_back(cur);
      cur = vector<long long>();
    }
  }
  for (vector<long long> &a : arr) {
    sort(begin(a), end(a));
  }
  vector<long long> cand;
  for (vector<long long> &a : arr) {
    for (long long i = 0; i <= (long long)a.size() - K; ++i) {
      cand.push_back(a[i]);
    }
  }
  if (cand.size() < Q) return 1e9;
  sort(begin(cand), end(cand));
  return cand[Q - 1] - cand[0];
}
signed main() {
  cin >> N >> K >> Q;
  A.resize(N);
  for (long long i = 0; i < (long long)N; ++i) cin >> A[i];
  long long ans = 1e9 + 5;
  for (long long i = 0; i < (long long)N; ++i) {
    ans = min(ans, f(A[i]));
  }
  cout << ans << endl;
}
