#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000;
int n, k, q, A[MAXN + 5];
set<int> srt;
int SOLVE(int x) {
  priority_queue<int, vector<int>, greater<int> > pri;
  for (int i = 0; i < n; i++) {
    while (i < n && A[i] < x) i++;
    priority_queue<int, vector<int>, greater<int> > que;
    while (i < n && A[i] >= x) que.push(A[i++]);
    if (que.size() >= k) {
      int cnt = 0, len = que.size();
      while (!que.empty() && cnt < len - k + 1)
        pri.push(que.top()), que.pop(), cnt++;
    }
  }
  if (pri.size() < q) return 1e9;
  return *(&pri.top() + q - 1) - pri.top();
}
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 0; i < n; i++) scanf("%d", &A[i]), srt.insert(A[i]);
  int ans = 1e9 + 5;
  for (set<int>::iterator it = srt.begin(); it != srt.end(); it++)
    ans = min(ans, SOLVE(*it));
  printf("%d\n", ans);
  return 0;
}
