#include <bits/stdc++.h>
using namespace std;
int n, k, q;
vector<int> a;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> q;
  a.resize(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  int ans = 1.5e9;
  for (int ri = 0; ri < n; ++ri) {
    int l = 0, r = -1;
    vector<int> vals;
    while (l < n) {
      r = l;
      while (r + 1 < n && a[r + 1] >= a[ri]) ++r;
      if (r - l + 1 >= k) {
        vector<int> tmp(r - l + 1);
        for (int i = 0; i <= r - l; ++i) tmp[i] = a[l + i];
        sort(tmp.begin(), tmp.end());
        for (int i = 0; i + k <= tmp.size(); ++i) vals.push_back(tmp[i]);
      }
      l = r + 2;
      while (l < n && a[l] < a[ri]) ++l;
    }
    sort(vals.begin(), vals.end());
    if (vals.size() < q) continue;
    ans = min(ans, vals[q - 1] - vals[0]);
  }
  cout << ans << endl;
}
