#include <bits/stdc++.h>
using namespace std;
int a[2010];
bool used[2010];
int ans = 1e9;
priority_queue<int, vector<int>, greater<int> > pq, pq2;
int main() {
  int n, k, q;
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    memset(used, 0, sizeof(used));
    while (!pq2.empty()) pq2.pop();
    for (int j = 1; j <= n; j++)
      if (a[j] < a[i]) used[j] = 1;
    int st = 0;
    used[n + 1] = 1;
    for (int j = 1; j <= n + 1; j++) {
      if (used[j] == 1) {
        for (int l = st + 1; l < j; l++) {
          pq.push(a[l]);
        }
        for (int l = 1; l <= j - st - k; l++) pq2.push(pq.top()), pq.pop();
        st = j;
      }
      while (!pq.empty()) pq.pop();
    }
    int now = 0;
    while (!pq2.empty()) {
      pq2.pop();
      now++;
      if (now == q - 1) break;
    }
    if (now < q - 1 || pq2.empty()) continue;
    ans = min(ans, pq2.top() - a[i]);
  }
  printf("%d", ans);
  return 0;
}
