#include <bits/stdc++.h>
using namespace std;
double pi = 3.141592653589793;
signed main() {
  long long n, k, q;
  cin >> n >> k >> q;
  long long a[2005];
  vector<long long> b;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    b.push_back(a[i]);
  }
  sort(b.begin(), b.end());
  vector<long long> m;
  for (long long i = 0; i < n; i++) {
    long long v = 1;
    for (long long j = i - k + 1; j < i + k; j++) {
      if (j < 0)
        continue;
      else if (a[i] > a[j]) {
        v = 0;
        break;
      }
    }
    if (v) m.push_back(a[i]);
  }
  long long ans = 1000000007;
  for (long long i = 0; i < m.size(); i++) {
    long long h = lower_bound(m.begin(), m.end(), m[i]) - m.begin() + q - 1;
    if (h >= n) continue;
    long long key = b[h] - m[i];
    if (!i)
      ans = key;
    else
      ans = min(ans, key);
  }
  cout << ans << endl;
  return 0;
}
