#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10;
int a[N], t[N], n, k, q, b[N];
int main() {
  scanf("%d%d%d", &n, &k, &q);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  a[++n] = -1;
  int ans = INT_MAX;
  for (int tt = 1; tt <= n; ++tt) {
    int nw = a[tt], c = 0, lstps = 1;
    for (int i = 1; i <= n; ++i)
      if (a[i] < nw) {
        if (i - lstps < k) {
          lstps = i + 1;
          continue;
        }
        int cnt = 0;
        for (int j = lstps; j <= i - 1; ++j) b[++cnt] = a[j];
        nth_element(b + 1, b + cnt - k, b + cnt + 1);
        for (int j = 1; j <= cnt - k + 1; ++j) t[++c] = b[j];
        lstps = i + 1;
      }
    if (c < q) continue;
    nth_element(t + 1, t + q, t + c + 1);
    ans = min(ans, t[q] - nw);
  }
  cout << ans << endl;
  return 0;
}
