#include <bits/stdc++.h>
using namespace std;
const int maxN = 2005;
int n, k, q;
int a[maxN];
int ans = 2 * (int)1e9 + 10;
vector<int> g[maxN];
int id[maxN];
int sz[maxN];
void go(int i) {
  int l = 1;
  int r = 1;
  int cnt = 0;
  while (l <= n) {
    if (a[l] < a[i]) {
      l++;
      r++;
      continue;
    }
    while (a[r] >= a[i] && r <= n) r++;
    r--;
    r = min(r, n);
    if (l <= i && i <= r) {
      if ((r - l + 1) < k) return;
    }
    if ((r - l + 1) >= k) {
      cnt++;
      g[cnt].clear();
      for (int j = l; j <= r; j++) {
        if (j == i) continue;
        g[cnt].push_back(a[j]);
        id[j] = cnt;
      }
      sz[cnt] = g[cnt].size();
    }
    l = r + 1;
    r = r + 1;
  }
  int mx = a[i];
  int nq = q - 1;
  set<pair<int, int> > s;
  for (int v = 1; v <= cnt; v++) {
    for (int j = 0; j < g[v].size(); j++) {
      s.insert(make_pair(g[v][j], j));
    }
  }
  while (nq > 0) {
    if (s.empty()) return;
    auto t = (*s.begin());
    s.erase(s.begin());
    int val = t.first;
    int num = t.second;
    mx = val;
    nq--;
    sz[id[num]]--;
    if (sz[id[num]] < k) {
      int v = id[num];
      for (int j = 0; j < g[v].size(); j++) {
        s.erase(make_pair(g[v][j], j));
      }
    }
  }
  ans = min(ans, mx - a[i]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    go(i);
  }
  cout << ans;
  return 0;
}
