#include <bits/stdc++.h>
using namespace std;
int n, k, Q, ans = 9e9, cnt, s, a[2005];
vector<int> b;
int main() {
  int i, j;
  cin >> n >> k >> Q;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    s = 0;
    cnt = 0;
    b.clear();
    for (j = 1; j <= n; j++) {
      if (a[j] >= a[i]) {
        cnt++;
        b.push_back(a[j]);
      } else {
        s += max(cnt - k + 1, 0);
        cnt = 0;
      }
    }
    s += max(cnt - k + 1, 0);
    if (s >= Q) {
      sort(b.begin(), b.end());
      ans = min(ans, b[Q - 1] - a[i]);
    }
  }
  cout << ans;
  return 0;
}
