#include <bits/stdc++.h>
using namespace std;
template <class T>
using vv = vector<vector<T> >;
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size();
  s << "\n";
  for (int i = 0; i < len; ++i) {
    s << v[i];
    if (i < len - 1) s << "\t";
  }
  s << "\n";
  return s;
}
template <typename T>
ostream& operator<<(ostream& s, const vector<vector<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) {
    s << vv[i];
  }
  return s;
}
int n, k, q;
vector<vector<int> > b;
bool possible(int mid) {
  vector<int> lis(mid + 2);
  for (int(i) = (0); (i) < (mid); ++(i)) {
    lis[i] = b[i][1];
  }
  lis[mid] = -1;
  lis[mid + 1] = n;
  sort(begin(lis), end(lis));
  int cnt = 0;
  for (int(i) = (0); (i) < (mid + 1); ++(i)) {
    int d = lis[i + 1] - lis[i] - 1;
    cnt += max(0, d - k + 1);
  }
  if (cnt >= q) {
    return true;
  } else {
    return false;
  }
}
int main() {
  scanf("%d %d %d", &n, &k, &q);
  vector<int> a(n);
  for (int(i) = (0); (i) < (n); ++(i)) {
    scanf("%d", &a[i]);
  }
  b.assign(n, vector<int>(2));
  for (int(i) = (0); (i) < (n); ++(i)) {
    b[i][0] = a[i];
    b[i][1] = i;
  }
  sort(begin(b), end(b));
  int l = 0;
  int r = n;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (possible(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  int ans = 1e9;
  for (int(i) = (0); (i) < (r); ++(i)) {
    ans = min(ans, b[i + q - 1][0] - b[i][0]);
  }
  printf("%d\n", ans);
  return 0;
}
