#include <bits/stdc++.h>
using namespace std;
int arr[2005];
int main() {
  int n, k, q, ans = 1e9;
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  for (int i = 0; i < n; i++) {
    int l = -1, cnt = 0;
    vector<int> v;
    for (int j = 0; j <= n; j++) {
      if (arr[j] < arr[i]) {
        cnt += max(0, j - l - k);
        l = j;
      } else
        v.push_back(arr[j]);
    }
    if (cnt >= q) {
      sort(v.begin(), v.end());
      ans = min(ans, v[q - 1] - v[0]);
    }
  }
  printf("%d", ans);
}
