#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
void print(int i) { printf("%d", i); }
void print(long long i);
template <class T>
void PI(T i) {
  print(i);
  puts("");
}
template <class T>
void PIS(T i) {
  print(i);
  printf(" ");
}
template <class T>
void PV(T const &v, int N) {
  for (int i = 0; i < int(N); i++) {
    print(v[i]);
    printf("%c", i == N - 1 ? '\n' : ' ');
  }
}
template <class T>
void PV(T const &v) {
  PV(v, ((int)(v).size()));
}
template <class T, class S>
bool has_bit(T mask, S i) {
  return (mask >> i) & 1;
}
long long shift(int i) { return 1ll << i; }
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
int popcount(int x) { return __builtin_popcount(x); }
int popcount(long long x) { return __builtin_popcountll(x); }
class DisjointSet {
  vector<int> par, _size;
  int N;
  void init() {
    for (int i = 0; i < N; i++) {
      par[i] = i;
      _size[i] = 1;
    }
  }

 public:
  DisjointSet(int _N) : par(_N), _size(_N), N(_N) { init(); }
  int find(int x) {
    if (par[x] == x)
      return x;
    else
      return par[x] = find(par[x]);
  }
  void unite(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return;
    if (_size[x] < _size[y]) {
      par[x] = y;
      _size[y] += _size[x];
    } else {
      par[y] = x;
      _size[x] += _size[y];
    }
  }
  int size(int x) { return _size[find(x)]; }
};
int main() {
  int N, K, Q;
  scanf("%d", &N), scanf("%d", &K), scanf("%d", &Q);
  DisjointSet ds(N);
  vector<int> A(N);
  vector<pair<int, int> > B;
  for (int i = 0; i < int(N); i++) {
    scanf("%d", &A[i]);
    B.emplace_back(A[i], i);
  }
  vector<int> used(N);
  sort((B).begin(), (B).end(), greater<pair<int, int> >());
  int ans = INF;
  for (auto &pr : B) {
    int a = pr.first, i = pr.second;
    used[i] = true;
    if (i - 1 >= 0 && used[i - 1]) {
      ds.unite(i, i - 1);
    }
    if (i + 1 < N && used[i + 1]) {
      ds.unite(i, i + 1);
    }
    vector<vector<int> > c(N);
    for (int j = 0; j < int(N); j++) {
      if (used[j]) {
        c[ds.find(j)].push_back(A[j]);
      }
    }
    vector<int> d;
    for (auto &v : c) {
      if (((int)(v).size()) >= K) {
        sort((v).begin(), (v).end());
        for (int k = 0; k < int(((int)(v).size()) - K + 1); k++) {
          d.push_back(v[k]);
        }
      }
    }
    if (((int)(d).size()) >= Q) {
      ans = min(ans, d[Q - 1] - a);
    }
  }
  PI(ans);
  return 0;
}
