#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  pair<int, int> a[n];
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  vector<int> v;
  v.push_back(n);
  int mi = a[q - 1].first - a[0].first;
  for (int i = 0; i < (int)(n); i++) {
    v.push_back(a[i].second);
    sort(v.begin(), v.end());
    int num = 0;
    int pos = 0;
    for (auto e : v) {
      num += max(0, e - pos - k);
      pos = e;
    }
    if (num < q) break;
    mi = min(mi, a[q + i].first - a[i + 1].first);
  }
  cout << mi << endl;
  return 0;
}
