#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)2e5 + 5;
const int MOD = (int)1e9 + 7;
int a[MAXN];
int b[MAXN];
int n, k, q;
bool isok() {
  int l, r;
  l = 1, r = n;
  int re = 0;
  int lnum = 0, rnum = 0, num = 0;
  while (r - l + 1 + num >= k && l <= r) {
    while (!b[l] && l < n) l++, num++, lnum++;
    while (!b[r] && r > 0) r--, num++, rnum++;
    if (r - l + 1 + num >= k && l <= r) {
      re++;
      if (lnum <= rnum)
        l++;
      else
        r--;
    }
  }
  return re >= q;
}
vector<int> ve;
bool check(int x) {
  for (auto vl : ve) {
    auto it = upper_bound(ve.begin(), ve.end(), vl + x);
    it--;
    for (int i = 1; i <= n; i++) {
      if (a[i] >= vl && a[i] <= *it)
        b[i] = 1;
      else
        b[i] = 0;
    }
    if (isok()) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), ve.push_back(a[i]);
  sort(ve.begin(), ve.end());
  int l = 0, r = ve.back() - ve[0], ans;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      r = mid - 1;
      ans = mid;
    } else
      l = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
