#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000010;
const long long MOD = 1000000007;
const long long LINF = 1000000000000000000;
int n, k, qu;
long long a[2010];
bool check(long long s) {
  for (int i = 0; i < n; i++) {
    long long x = a[i];
    priority_queue<pair<long long, int>, vector<pair<long long, int>>,
                   greater<pair<long long, int>>>
        q;
    int co = 0;
    int c = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] < x) {
        while (!q.empty()) q.pop();
        co = 0;
      } else {
        q.push(pair<long long, int>(a[j], j));
        co++;
        while (!q.empty() && q.top().second < j - k + 1) q.pop();
        if (co >= k && q.top().first <= x + s) {
          c++;
          co--;
          q.pop();
        }
      }
    }
    if (c >= qu) return true;
  }
  return false;
}
int main() {
  cin >> n >> k >> qu;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ok = INF, ng = -1;
  while (ok - ng > 1) {
    int mid = (ok + ng) / 2;
    if (check(mid)) {
      ok = mid;
    } else {
      ng = mid;
    }
  }
  cout << ok << endl;
}
