#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 2000;
const int INF = 1e9;
int N, K, Q;
int A[N_MAX];
pair<int, int> B[N_MAX];
vector<int> vs;
int ws[N_MAX];
map<int, int> ss;
void solve() {
  for (int i = 0; i < (int)(N); i++) B[i] = make_pair(A[i], i);
  sort(B, B + N);
  ss[N] = 0;
  int ans = INF;
  int i = 0;
  while (true) {
    vs.clear();
    for (auto it = ss.begin(); it != ss.end(); it++) {
      int l = it->second;
      int r = it->first;
      int w = r - l;
      if (w >= K) {
        copy(A + l, A + r, ws);
        sort(ws, ws + w);
        vs.insert(vs.end(), ws, ws + w - K + 1);
      }
    }
    if (vs.size() < Q) break;
    sort(vs.begin(), vs.end());
    ans = min(ans, vs[Q - 1] - vs[0]);
    int v = B[i].first;
    while (B[i].first == v) {
      int x = B[i].second;
      auto it2 = ss.lower_bound(x);
      int l = it2->second;
      int r = it2->first;
      ss.erase(r);
      if (x > l) ss[x] = l;
      if (x + 1 < r) ss[r] = x + 1;
      i++;
    }
  }
  printf("%d\n", ans);
}
void input() {
  scanf("%d%d%d", &N, &K, &Q);
  for (int i = 0; i < (int)(N); i++) scanf("%d", A + i);
}
int main() {
  input();
  solve();
  return 0;
}
