#include <bits/stdc++.h>
using namespace std;
const long long N = 2005, INF = 1e9 + 7;
long long n, k, q, a[N];
signed main() {
  if (strlen("") > 0)
    freopen(
        ""
        ".in",
        "r", stdin),
        freopen(
            ""
            ".out",
            "w", stdout);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> q;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  long long ans = INF;
  for (long long p = 1; p <= n; ++p) {
    long long first = a[p];
    vector<pair<long long, long long> > groups;
    long long i = 1;
    while (i <= n) {
      if (a[i] < first) {
        ++i;
        continue;
      }
      long long j = i;
      while (j <= n && a[j] >= first) {
        ++j;
      }
      --j;
      groups.push_back(make_pair(i, j));
      i = j + 1;
    }
    vector<long long> sex;
    for (long long i = 0; i < (long long)groups.size(); ++i) {
      vector<long long> curr;
      for (long long j = groups[i].first; j <= groups[i].second; ++j) {
        curr.push_back(a[j]);
      }
      sort(curr.begin(), curr.end());
      for (long long j = 0; j < (long long)curr.size() - k + 1; ++j) {
        sex.push_back(curr[j]);
      }
    }
    sort(sex.begin(), sex.end());
    if ((long long)sex.size() >= q) {
      ans = min(ans, sex[q - 1] - first);
    }
  }
  cout << ans << "\n";
  return 0;
}
