#include <bits/stdc++.h>
using namespace std;
void move_small(set<pair<int, int>> &p1s, set<pair<int, int>> &p2s, int num) {
  for (int i = 0; i < num; i++) {
    pair<int, int> p = *p1s.begin();
    p1s.erase(p);
    p2s.insert(p);
  }
}
int main(int argc, char *argv[]) {
  int N, K, Q, as[(2000)];
  scanf("%d %d %d", &N, &K, &Q);
  for (int i = 0; i < N; i++) {
    scanf("%d", &as[i]);
  }
  int ans = (1000000000);
  for (int i = 0; i < N; i++) {
    const int y = as[i];
    int num_around_y = 1;
    for (int j = i + 1; j < N && as[j] >= y; j++) {
      num_around_y++;
    }
    for (int j = i + 1; j < N && as[j] >= y; j++) {
      num_around_y++;
    }
    if (num_around_y < K) {
      continue;
    }
    set<pair<int, int>> ps, pblocks;
    for (int j = 0; j < N; j++) {
      const int a = as[j];
      if (a >= y) {
        pblocks.insert(make_pair(a, j));
      } else {
        move_small(pblocks, ps,
                   pblocks.size() >= K ? pblocks.size() - K + 1 : 0);
        pblocks.clear();
      }
    }
    move_small(pblocks, ps, pblocks.size() >= K ? pblocks.size() - K + 1 : 0);
    if (ps.size() < Q) {
      continue;
    }
    int x = 0;
    for (int k = 0; k < Q; k++) {
      pair<int, int> p = *ps.begin();
      x = p.first;
      ps.erase(p);
    }
    ans = min(ans, x - y);
  }
  printf("%d\n", ans);
  return 0;
}
