#include <bits/stdc++.h>
using namespace std;
struct point {
  long long num;
  long long name;
  bool operator<(const point& rhs) const { return num < rhs.num; }
};
long long const MAX = 2e3 + 4;
long long a[MAX];
point b[MAX];
long long c[MAX] = {};
int main() {
  cin.tie(0);
  long long n, k, q;
  cin >> n >> k >> q;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = {a[i], i};
  }
  sort(b + 1, b + n + 1);
  long long ans = 1e18;
  c[n + 1] = 1;
  for (long long i = 1; i <= n; i++) {
    if (i + q - 1 > n) break;
    long long x = b[i + q - 1].num - b[i].num;
    long long cur = 0;
    long long cnt = 0;
    for (long long j = 1; j <= n + 1; j++) {
      if (c[j] == 0) {
        cur++;
      } else {
        if (cur >= k) {
          cnt += (cur - k + 1);
        }
        cur = 0;
      }
    }
    if (cnt >= q) {
      ans = min(ans, x);
    } else {
      break;
    }
    c[b[i].name] = 1;
  }
  cout << ans << endl;
}
