#include <bits/stdc++.h>
using namespace std;
const int MX = 2005;
int n, k, q, a[MX], res = 2e9;
vector<pair<int, int> > v;
int acu[MX], gr[MX];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) cin >> a[i];
  a[n] = -1;
  for (int i = 0; i < n; i++) {
    fill(acu, acu + n, 0);
    fill(gr, gr + n, 0);
    v.clear();
    int act = a[i], ant = -1, mx, cn = 0;
    bool f = 0;
    for (int j = 0; j <= n; j++) {
      if (a[j] >= act) {
        if (f) {
          acu[ant]++;
          gr[j] = ant;
          v.emplace_back(a[j], j);
        } else {
          ant = j;
          acu[j]++;
          v.emplace_back(a[j], j);
          f = 1;
        }
      } else {
        f = 0;
      }
    }
    sort(v.begin(), v.end());
    for (pair<int, int> &u : v) {
      if (acu[gr[u.second]] < k) continue;
      mx = u.first;
      cn++;
      acu[gr[u.second]]--;
      if (cn == q) break;
    }
    if (cn == q) res = min(res, mx - act);
  }
  cout << res << '\n';
  return 0;
}
