#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, k, q;
  cin >> n >> k >> q;
  vector<int> a(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  a[n] = -INF;
  int ans = INF;
  for (int i = 0; i < n; i++) {
    int min_value = a[i];
    vector<int> cand;
    int left = -1, right = -1;
    for (int j = 0; j <= n; j++) {
      if (a[j] >= min_value) {
        if (left == -1) {
          left = j;
          right = j + 1;
        } else {
          right = j + 1;
        }
      } else {
        if (right - left >= k) {
          sort(a.begin() + left, a.begin() + right);
          for (int l = 0; l < right - left - k + 1; l++) {
            cand.push_back(a[left + l]);
          }
        }
        left = -1;
        right = -1;
      }
    }
    sort(cand.begin(), cand.end());
    if (cand.size() >= q) {
      ans = min(ans, cand[q - 1] - cand[0]);
    }
  }
  cout << ans << endl;
  return 0;
}
