#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
const int INF = 1e9;
int _w;
int n, k, q, a[N], r[N], ban[N];
bool cmp(int i, int j) { return a[i] < a[j]; }
int check() {
  int len = 0, tot = 0;
  for (int i = 1; i <= n; ++i)
    if (ban[i]) {
      tot += max(0, len - k + 1), len = 0;
    } else {
      ++len;
    }
  return tot + max(0, len - k + 1);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i], r[i] = i;
  sort(r + 1, r + n + 1, cmp);
  int ans = INF;
  for (int i = 1; i + q - 1 <= n; ++i) {
    int now = a[r[i + q - 1]] - a[r[i]];
    for (int j = 1; j <= n; ++j) ban[i] = 0;
    for (int j = 1; j < i; ++j) ban[r[i]] = 1;
    if (check() >= q) ans = min(ans, now);
  }
  cout << ans << endl;
  return 0;
}
