#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using uint = unsigned;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;
template <typename Value>
static inline void fillv(Value& x, const Value& val) {
  x = val;
}
template <typename Vector, typename Value>
static inline void fillv(Vector& v, const Value& val) {
  for (auto& x : v) fillv(x, val);
}
static inline void Solve();
int main(int argc, char* argv[]) {
  Solve();
  return 0;
}
constexpr int MAXN = 2000;
constexpr int INF = 0x7FFFFFFF;
int a[MAXN];
int b[MAXN];
int n, k, q;
vector<pii> get_ps(int i) {
  vector<pii> rst;
  for (int j = 0; j <= n; j++) {
    if (j < n && b[j] >= b[i]) {
      if (rst.empty() || rst.back().second != j - 1) {
        rst.push_back({j, j});
      }
      rst.back().second = j;
    } else {
      if (!rst.empty() && rst.back().second - rst.back().first + 1 < k) {
        rst.pop_back();
      }
    }
  }
  return rst;
}
int tmp[MAXN];
int solve(int i) {
  for (int j = 0; j < n; j++) b[j] = a[j];
  auto ps = get_ps(i);
  bool hasi = false;
  vector<int> minv;
  for (auto& p : ps) {
    if (p.first <= i && i <= p.second) {
      hasi = true;
    }
    int num = p.second - p.first + 1;
    nth_element(b + p.first, b + p.first + num - k + 1, b + p.second + 1);
    for (auto it = b + p.first; it != b + p.first + num - k + 1; it++) {
      minv.push_back(*it);
    }
  }
  if (!hasi) return INF;
  if ((int)minv.size() < q) return INF;
  nth_element(minv.begin(), minv.begin() + q, minv.end());
  return minv[q - 1] - a[i];
}
void Solve() {
  cin >> n >> k >> q;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int ans = INF;
  for (int i = 0; i < n; i++) {
    ans = min(ans, solve(i));
  }
  cout << ans << endl;
}
