#include <bits/stdc++.h>
const int N = 2000;
int n, k, q, a[N];
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
  int result = INT_MAX;
  for (int mi_idx = 0; mi_idx < n; ++mi_idx) {
    int mi = a[mi_idx];
    int last = -1;
    std::vector<int> candidates;
    for (int i = 0; i <= n; ++i) {
      if (i == n || a[i] < mi) {
        std::vector<int> elems;
        for (int j = last + 1; j < i; ++j) {
          elems.push_back(a[j]);
        }
        std::sort(elems.begin(), elems.end());
        for (int j = 0; j < (i - last - 1) - (k - 1); ++j) {
          candidates.push_back(elems[j]);
        }
        last = i;
      }
    }
    if ((int)candidates.size() >= q) {
      result = std::min(result, candidates[q - 1] - candidates[0]);
    }
  }
  printf("%d\n", result);
}
