#include <bits/stdc++.h>
using namespace std;
long long N, M, H, W, K, Q, A, B, C, L, R;
string S, T;
const long long MOD = (1e+9) + 7;
const long long INF = 1LL << 59;
const long double EPS = 1e-9;
int main() {
  cin >> N >> K >> Q;
  vector<long long> a(N), ord(N), ord_inv(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  for (int i = 0; i < N; i++) ord[i] = i;
  sort(ord.begin(), ord.end(),
       [&](long long x, long long y) { return a[x] < a[y]; });
  for (int i = 0; i < N; i++) ord_inv[ord[i]] = i;
  set<long long> id = {N};
  vector<vector<long long> > usable(N, vector<long long>(N, -1));
  vector<long long> range(0);
  long long range_id = -1;
  for (int i = 0; i < N; i++) {
    long long last = -1;
    auto ite = id.begin();
    range.push_back(*ite - last - 1);
    ++range_id;
    for (int j = 0; j < N; j++) {
      if (*ite == j) {
        last = *ite;
        ++ite;
        range.push_back(*ite - last - 1);
        ++range_id;
        continue;
      }
      usable[i][j] = range_id;
    }
    id.insert(ord[i]);
  }
  long long ans = INF;
  for (int i = 0; i < N; i++) {
    long long temp = 0, q = 0, small_rank = i;
    if (range[usable[i][i]] < K) {
      continue;
    }
    while ((q < Q) && (small_rank < N)) {
      if (range[usable[i][ord_inv[ord[small_rank]]]] >= K) {
        --range[usable[i][ord_inv[ord[small_rank]]]];
        temp = a[ord[small_rank]];
        ++q;
      }
      ++small_rank;
    }
    if (q == Q) {
      ans = min(ans, temp - a[ord[i]]);
    }
  }
  cout << ans << endl;
  return 0;
}
