#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > v;
int n, q, k, a[2002], y, sol;
int main() {
  sol = 1000000000;
  cin >> n >> k >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    int x = a[i];
    for (int j = 1; j <= n; j++) {
      if (a[j] < x) continue;
      vector<int> s;
      while (j <= n && a[j] >= x) {
        s.push_back(a[j]);
        j++;
      }
      sort(s.begin(), s.end());
      if (s.size() >= k) v.push_back(s);
    }
    priority_queue<pair<int, int> > pq;
    vector<int> poz;
    for (int j = 0; j < v.size(); j++) {
      poz.push_back(0);
      pq.push({v[j][0], j});
    }
    bool ok = 1;
    for (int j = 1; j <= q; j++) {
      if (pq.empty() > 0) {
        ok = 0;
        break;
      } else {
        int p = pq.top().second;
        y = pq.top().first;
        pq.pop();
        if (v[p].size() - poz[p] - 1 >= k) {
          poz[p]++;
          pq.push({v[p][poz[p]], p});
        }
      }
    }
    if (ok) sol = min(sol, y - x);
    v.clear();
  }
  cout << sol;
  return 0;
}
