#include <bits/stdc++.h>
using namespace std;
int a[2048];
int n, k, q;
bool works(int smallest, int distance) {
  set<pair<int, int>> cur;
  unordered_set<int> inserted;
  for (int i = (0); i < (int)(k - 1); i++) {
    cur.insert({a[i], i});
    inserted.insert(i);
  }
  int took = 0;
  int next = k - 1;
  while (next < n) {
    cur.insert({a[next], next});
    inserted.insert(next++);
    if (smallest <= cur.begin()->first &&
        cur.begin()->first <= smallest + distance) {
      auto totake = cur.begin();
      inserted.erase(totake->second);
      cur.erase(totake);
      took++;
    } else {
      int totake = *inserted.begin();
      inserted.erase(totake);
      cur.erase({a[totake], totake});
    }
  }
  return took >= q;
}
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  cin >> n >> k >> q;
  for (int i = (0); i < (int)(n); i++) cin >> a[i];
  set<int> seen;
  int best = 1e9;
  for (int smallest = (0); smallest < (int)(n); smallest++)
    if (seen.find(a[smallest]) == seen.end()) {
      seen.insert(a[smallest]);
      int more = min(best, *max_element(a, a + n) - a[smallest] + 1);
      int left = -1, right = more;
      while (left + 1 < right) {
        int mid = (left + right) / 2;
        if (works(a[smallest], mid)) {
          right = mid;
        } else {
          left = mid;
        }
      }
      if (right != more) best = min(best, right);
    }
  cout << best << endl;
}
