#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int MOD = 998244353;
int a[N], n, k, q;
int ans = 1e9 + 9;
void cul(int mn) {
  int l = 1, r = 1;
  int c[5000];
  int cnt = 0;
  while (l <= n) {
    while (l <= n && a[l] < mn) l++;
    r = l;
    while (r <= n && a[r] >= mn) r++;
    r--;
    if (r - l + 1 >= k) {
      int t[5000];
      int j = 0;
      for (int i = l; i <= r; ++i) t[++j] = a[i];
      for (int i = cnt + 1; j > 0; i++, j--) {
        c[i] = a[j];
      }
      cnt += r - l + 1;
    }
    l = ++r;
  }
  if (cnt >= q) {
    sort(c + 1, c + 1 + cnt);
    if (c[1] == mn) {
      ans = min(ans, c[q] - mn);
    }
  }
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> k >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cul(a[i]);
  cout << ans << endl;
  return 0;
}
void bef0re_submit() {
  puts("Make sure the algorithm is right!");
  puts("LONG LONG!!!");
  puts("n==0?1?2?3?");
  puts("Make sure output format is right/// Yes??YES  (%.20LF)???");
  puts("if all meet,run with special situation!!!");
  puts("I confirm that I have done all above");
  puts("If u know brute,consider fast,binary(log) or tree?");
}
