#include <bits/stdc++.h>
using namespace std;
const long long INFL = 1LL << 60;
const int INF = 1 << 30;
const long long MOD = 1e9 + 7;
long long max(long long a, long long b) { return (a > b) ? a : b; }
long long min(long long a, long long b) { return (a < b) ? a : b; }
long long pow_long(long long x, long long k) {
  long long res = 1;
  while (k > 0) {
    if (k % 2) res *= x;
    x *= x;
    k /= 2;
  }
  return res;
}
const long long N_ = (1 << 18);
long long seg[2 * N_ - 1];
void update(long long k, long long x) {
  k += N_ - 1;
  seg[k] = x;
  while (k > 0) {
    k = (k - 1) / 2;
    seg[k] = min(seg[2 * k + 1], seg[2 * k + 2]);
  }
}
long long query(long long x, long long y, long long k, long long left,
                long long right) {
  if (right <= x || y <= left) return INFL;
  if (x <= left && right <= y) return seg[k];
  long long mid = (left + right) / 2;
  long long l = query(x, y, 2 * k + 1, left, mid);
  long long r = query(x, y, 2 * k + 2, mid, right);
  return min(l, r);
}
long long N, K, Q;
vector<long long> A;
int main(void) {
  cin >> N >> K >> Q;
  A.resize(N);
  for (long long i = 0; i < (N); i++) cin >> A[i];
  for (long long i = 0; i < (N); i++) update(i, A[i]);
  long long ans = INFL;
  for (long long i = 0; i < (N); i++) {
    vector<pair<long long, long long>> can;
    for (long long j = 0; j < (N); j++) {
      long long k = j + K;
      if (query(j, k, 0, 0, N_) >= A[i]) {
        while (query(j, k + 1, 0, 0, N_) >= A[i]) k++;
        can.push_back({j, k});
        j = k - 1;
      }
    }
    long long cnt = 0;
    for (long long j = 0; j < (can.size()); j++)
      cnt += (can[j].second - can[j].first) - K + 1;
    if (cnt < Q) continue;
    vector<long long> xs;
    for (long long j = 0; j < (can.size()); j++)
      for (long long k = can[j].first; k < can[j].second; k++)
        xs.push_back(A[k]);
    sort(xs.begin(), xs.end());
    if (xs[0] != A[i]) continue;
    ans = min(ans, xs[Q - 1] - A[i]);
  }
  cout << ans << endl;
}
