#include <bits/stdc++.h>

using namespace std;

int n, q, k, a[2002], y, sol;

int main()
{
  sol = 2000000000;
  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];
    vector<vector<int> >v;
    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>,  vector<pair<int, int>, greater<pair<int, int> >pq;
    int poz[2002];
    memset(poz, 0, sizeof(poz));
    for (int j = 0; j < v.size(); j++) {
      pq.push({v[j][0], j});
    }
    bool ok = 1;
    for (int j = 1; j <= q; j++) {
      if (pq.empty()) {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);
  }
  cout << sol;
  return 0;
}
