#include <bits/stdc++.h>
using namespace std;
const long long N = 2005, inf = 1e18;
long long n, K, q, a[N], ans = inf;
bool unUse[N];
long long solve() {
  long long ret = 0, cnt = 0;
  priority_queue<long long, vector<long long>, greater<long long> > pq;
  for (long long i = 1; i <= n; ++i) {
    if (unUse[i]) {
      long long tmp = pq.size();
      if (tmp >= K) {
        while (pq.size() >= K && cnt < q)
          ret = max(ret, pq.top()), pq.pop(), cnt++;
      }
      while (!pq.empty()) pq.pop();
    } else
      pq.push(a[i]);
  }
  long long tmp = pq.size();
  if (tmp >= K) {
    while (pq.size() >= K && cnt < q) ret = max(ret, pq.top()), pq.pop(), cnt++;
  }
  while (!pq.empty()) pq.pop();
  if (cnt < q) ret = 2 * inf;
  return ret;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> K >> q;
  for (long long i = 1; i <= n; ++i) cin >> a[i];
  for (long long i = 1; i <= n; ++i) {
    memset(unUse, 0, sizeof unUse);
    for (long long j = 1; j <= n; ++j)
      if (a[j] < a[i]) unUse[j] = 1;
    ans = min(ans, solve() - a[i]);
  }
  cout << ans;
  return 0;
}
