#include <bits/stdc++.h>
using namespace std;
const int N = 2002;
int a[N], n, k, Q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> Q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int ans = 1e9;
  for (int i = 1; i <= n; ++i) {
    priority_queue<int> q;
    int l = 0, s = 0;
    for (int r = 1; r <= n + 1; ++r) {
      if (a[r] < a[i]) {
        while (q.size() > s + max(0, r - l - k + 1)) q.pop();
        s = q.size();
        l = r;
      } else
        q.push(a[r]);
    }
    while (q.size() > Q) q.pop();
    if (q.size() < Q) continue;
    ans = min(ans, q.top() - a[i]);
  }
  cout << ans << endl;
}
