#include <bits/stdc++.h>
using namespace std;
struct UnionFind {
  vector<int> v;
  UnionFind(int n) : v(n, -1) {}
  void init() {
    for (int i = 0; i < v.size(); i++) v[i] = -1;
  }
  int find(int x) { return v[x] < 0 ? x : v[x] = find(v[x]); }
  bool unite(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return false;
    if (-v[x] < -v[y]) swap(x, y);
    v[x] += v[y];
    v[y] = x;
    return true;
  }
  bool root(int x) { return v[x] < 0; }
  bool same(int x, int y) { return find(x) == find(y); }
  int size(int x) { return -v[find(x)]; }
};
long long n, K, Q;
long long a[2001];
bool used[2001];
int main() {
  cin >> n >> K >> Q;
  for (long long i = (long long)(0); i < (long long)(n); i++) cin >> a[i];
  long long res = 1e16;
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    UnionFind uf(n);
    memset(used, 0, sizeof(used));
    for (long long j = (long long)(0); j < (long long)(n - 1); j++) {
      if (a[j] >= a[i] && a[j + 1] >= a[i]) uf.unite(j, j + 1);
    }
    long long sz = 0;
    for (long long j = (long long)(0); j < (long long)(n); j++) {
      if (a[j] >= a[i] && uf.size(j) >= K) {
        if (used[uf.find(j)]) continue;
        used[uf.find(j)] = true;
        sz += uf.size(j) - K + 1;
      }
    }
    if (sz < Q) continue;
    vector<long long> b;
    for (long long j = (long long)(0); j < (long long)(n); j++) {
      if (a[j] >= a[i] && uf.size(j) >= K) {
        b.push_back(a[j]);
      }
    }
    sort((b).begin(), (b).end());
    res = (res < b[Q - 1] - a[i] ? res : b[Q - 1] - a[i]);
  }
  cout << res << endl;
  return 0;
}
