#include <bits/stdc++.h>
using namespace std;
struct edge {
  int from, to;
  long long cost;
};
const long long MOD = 1000000007;
int n, k, q;
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> q;
  vector<long long> a(n + 1, 0LL);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long ans = LLONG_MAX;
  for (int i = 0; i < n; i++) {
    long long min_ = a[i];
    vector<long long> maxs;
    vector<long long> b;
    for (int j = 0; j < n + 1; j++) {
      if (a[j] < min_) {
        int m = int(b.size());
        if (m < k) continue;
        sort(b.begin(), b.end());
        for (int j = 0; j < min(m - k + 1, q); j++) maxs.push_back(b[j]);
        b.clear();
      } else {
        b.push_back(a[j]);
      }
    }
    if (int(maxs.size()) >= q) {
      sort(maxs.begin(), maxs.end());
      ans = min(ans, maxs[q - 1] - min_);
    }
  }
  cout << ans << endl;
}
