#include <bits/stdc++.h>
const long long N = 2e3 + 5, INF = 1e9;
using namespace std;
long long n, k, q, a[N], prv[N], nxt[N], mn = INF;
signed main() {
  cin >> n >> k >> q;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    long long y = a[i], pr = 0, nx = n + 1;
    for (long long j = 1; j <= n; j++) {
      prv[j] = pr;
      if (a[j] < y) pr = j;
    }
    for (long long j = n; j >= 1; j--) {
      nxt[j] = nx;
      if (a[j] < y) nx = j;
    }
    vector<long long> tk;
    for (long long j = 1; j <= n; j++) {
      if (nxt[j] - prv[j] > k) tk.push_back(a[j]);
    }
    sort(tk.begin(), tk.end());
    if (tk.size() >= q) {
      mn = min(mn, tk[q - 1] - tk[0]);
    }
  }
  cout << mn;
}
