#include <bits/stdc++.h>
using namespace std;
const long long INF = 1l << 55;
class RMQ {
 private:
  long long n;
  vector<long long> dat;
  long long rec(long long a, long long b, long long k, long long l,
                long long r) {
    if (b <= l || r <= a) {
      return INF;
    }
    if (a <= l && r <= b) {
      return dat[k];
    } else {
      long long rl = rec(a, b, 2 * k + 1, l, (l + r) / 2);
      long long rr = rec(a, b, 2 * k + 2, (l + r) / 2, r);
      return std::min(rl, rr);
    }
  }

 public:
  void init(long long n_) {
    n = 1;
    while (n < n_) n *= 2;
    dat.resize(2 * n - 1);
    for (long long i = 0; i < 2 * n - 1; i++) {
      dat[i] = INF;
    }
  }
  void update(long long k, long long a) {
    long long reaf = k + n - 1;
    dat[reaf] = a;
    while (reaf > 0) {
      reaf = (reaf - 1) / 2;
      dat[reaf] = std::min(dat[reaf * 2 + 1], dat[2 * reaf + 2]);
    }
  }
  long long query(long long a, long long b) { return rec(a, b + 1, 0, 0, n); }
};
long long N, K, Q;
long long A[2020];
RMQ rmq;
struct block {
  long long l, r;
  long long mini;
  vector<pair<long long, long long> > sorted;
  long long size;
  block(long long l, long long r, long long mini)
      : l(l), r(r), mini(mini), size(r - l) {
    for (long long i = l; i < r; ++i) {
      sorted.push_back(pair<long long, long long>(A[i], i));
    }
    sort(sorted.begin(), sorted.end(), greater<pair<long long, long long> >());
  }
  bool operator<(const block &right) const { return mini < right.mini; }
};
priority_queue<block> blocks;
signed main() {
  cin >> N >> K >> Q;
  rmq.init(N);
  for (long long i = 0; i < (N); ++i) {
    cin >> A[i];
    rmq.update(i, A[i]);
  }
  blocks.push(block(0, N, rmq.query(0, N)));
  long long Y = rmq.query(0, N);
  long long X = Y;
  vector<pair<long long, long long> > vec = blocks.top().sorted;
  for (long long i = 0; i < (Q); ++i) {
    X = vec[vec.size() - 1].first;
    vec.pop_back();
  }
  long long ans = X - Y;
  vector<long long> idxs;
  for (;;) {
    while (!blocks.empty()) {
      blocks.pop();
    }
    for (long long i = 0; i < (N); ++i) {
      if (A[i] == Y) idxs.push_back(i);
    }
    sort(idxs.begin(), idxs.end());
    if (idxs[0] - 0 >= K) blocks.push(block(0, idxs[0], rmq.query(0, idxs[0])));
    for (long long i = 0; i < (idxs.size() - 1); ++i) {
      if (idxs[i + 1] - idxs[i] - 1 >= K)
        blocks.push(block(idxs[i] + 1, idxs[i + 1],
                          rmq.query(idxs[i] + 1, idxs[i + 1])));
    }
    if (N - idxs[idxs.size() - 1] - 1 >= K)
      blocks.push(block(idxs[idxs.size() - 1] + 1, N,
                        rmq.query(idxs[idxs.size() - 1] + 1, N)));
    Y = blocks.top().mini;
    for (long long i = 0; i < (Q); ++i) {
      X = blocks.top().mini;
      if (blocks.empty()) goto printans;
      block block2 = blocks.top();
      block2.sorted.pop_back();
      block2.mini = block2.sorted[block2.sorted.size() - 1].first;
      block2.size--;
      blocks.pop();
      if (block2.size >= K) blocks.push(block2);
    }
    ans = min(ans, X - Y);
  }
printans:
  cout << ans << endl;
  return 0;
}
