#include <bits/stdc++.h>
using namespace std;
const int MC = 2010;
int N, K, Q;
int A[MC];
int s[MC], l[MC], r[MC];
int main() {
  cin >> N >> K >> Q;
  for (int i = (int)(1); i < (int)(N + 1); ++i) {
    cin >> A[i];
    s[i] = i;
    l[i] = i + 1;
    r[i] = i - 1;
  }
  l[0] = 1;
  r[0] = -1;
  l[N + 1] = N + 2;
  r[N + 1] = N;
  sort(s + 1, s + N + 1, [&](const int x, const int y) { return A[x] < A[y]; });
  int z = 0, ans = 1e9;
  for (int i = (int)(N); i > (int)(0); --i) {
    z -= max(0, r[s[i] - 1] - l[s[i] - 1] + 1 - (K - 1)) +
         max(0, r[s[i] + 1] - l[s[i] + 1] + 1 - (K - 1));
    l[s[i]] = l[s[i] - 1];
    r[s[i]] = r[s[i] + 1];
    l[r[s[i]]] = l[s[i]];
    r[l[s[i]]] = r[s[i]];
    z += max(0, r[s[i]] - l[s[i]] + 1 - (K - 1));
    if (z >= Q) ans = min(ans, A[s[i + Q - 1]] - A[s[i]]);
  }
  cout << ans << endl;
  return 0;
}
