#include <bits/stdc++.h>
using namespace std;
int n, k, q, y, a[2001], b[2001], t, ll, s[2001], ss, ans = 2e9;
bool cmp(int a, int b) { return a < b; }
int main() {
  scanf("%d %d %d", &n, &k, &q);
  for (register int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (register int j = 1; j <= n; j++) {
    y = a[j];
    memset(s, 0, sizeof(s));
    ss = 0;
    t = 0;
    for (register int i = 1; i <= n + 1; i++) {
      if (i == n + 1 || a[i] < y) {
        sort(b + 1, b + t + 1, cmp);
        ll = t - k + 1;
        for (register int l = 1; l <= ll; l++) s[++ss] = b[l];
        memset(b, 0, sizeof(b));
        t = 0;
      } else {
        b[++t] = a[i];
      }
    }
    if (ss < q) {
      continue;
    }
    sort(s + 1, s + ss + 1, cmp);
    ans = min(ans, s[q] - y);
  }
  printf("%d\n", ans);
  return 0;
}
