#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const int MOD = 1000000007;
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  vector<int> a(n);
  for (int i = (0); i < (n); i++) cin >> a[i];
  const int OUT_OF_RANGE = 10001;
  int mn = 1001001001;
  for (int i = (0); i < (n); i++) {
    vector<int> b;
    b.reserve(n + 1);
    int start = OUT_OF_RANGE;
    for (int j = (0); j < (n); j++) {
      if (a[j] < a[i]) {
        if (j - start < k) {
          start = OUT_OF_RANGE;
          continue;
        }
        vector<int> v(a.begin() + start, a.begin() + j);
        sort((v).begin(), (v).end());
        copy(v.begin(), v.begin() + j - start - k + 1, back_inserter(b));
      } else {
        if (start == OUT_OF_RANGE) start = j;
      }
    }
    if (n - start >= k) {
      vector<int> v(a.begin() + start, a.end());
      sort((v).begin(), (v).end());
      copy(v.begin(), v.begin() + n - start - k + 1, back_inserter(b));
    }
    if (b.size() >= q) {
      sort((b).begin(), (b).end());
      chmin(mn, b[q - 1] - b[0]);
    }
  }
  cout << mn << endl;
}
