#include <bits/stdc++.h>
using ll = long long;
constexpr int MAX_N = 2000;
constexpr ll INF = 1 << 30;
ll N, K, Q;
ll A[MAX_N];
ll ans = INF;
int main() {
  scanf("%lld%lld%lld", &N, &K, &Q);
  for (int i = (0); i < (N); ++i) scanf("%lld", A + i);
  for (int i = (0); i < (N); ++i) {
    ll X = A[i];
    std::vector<std::vector<ll> > vss;
    std::vector<ll> vs, qs;
    for (int j = (0); j < (N); ++j) {
      if (A[j] >= X)
        vs.push_back(A[j]);
      else {
        if (!vs.empty() && vs.size() < K) goto end;
        if (!vs.empty()) vss.push_back(vs);
        vs.clear();
      }
    }
    if (!vs.empty() && vs.size() < K) goto end;
    if (!vs.empty()) vss.push_back(vs);
    for (int j = (0); j < (vss.size()); ++j) {
      std::sort((vss[j]).begin(), (vss[j]).end());
      for (int k = (0); k < (vss[j].size() - K + 1); ++k)
        qs.push_back(vss[j][k]);
    }
    if (qs.size() < Q) goto end;
    std::sort((qs).begin(), (qs).end());
    ans = std::min(ans, qs[Q - 1] - X);
  end:;
  }
  printf("%lld\n", ans);
  return 0;
}
