#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using TP = tuple<ll, ll, ll>;
void init_io() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(18);
}
signed main() {
  init_io();
  ll n, k, q, ans = 1e18, ev = -1;
  cin >> n >> k >> q;
  vector<ll> a(n);
  vector<P> ap(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ap[i] = P(a[i], i);
  }
  for (int i = 0; i < n; i++) {
    multiset<ll> ms;
    vector<ll> use;
    ev = ap[i].first;
    for (int j = 0; j < n; j++) {
      if (ev <= ap[i].first) {
        ms.insert(ap[j].first);
      } else {
        ll usable = max(0ll, (ll)ms.size() - k + 1);
        for (auto v : ms) {
          if (usable == 0) {
            break;
          }
          usable--;
          use.push_back(v);
        }
        ms.clear();
      }
    }
    ll usable = max(0ll, (ll)ms.size() - k + 1);
    for (auto v : ms) {
      if (usable == 0) {
        break;
      }
      use.push_back(v);
      usable--;
    }
    ms.clear();
    if ((ll)use.size() < q) {
      break;
    }
    sort(use.begin(), use.end());
    ans = min(ans, use[q - 1] - use[0]);
  }
  cout << ans << endl;
}
