#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
inline void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
};
template <typename T, typename S>
inline ostream& operator<<(ostream& os, const pair<T, S> p) {
  cout << "[" << p.first << ";" << p.second << "]";
  return os;
}
template <typename T, typename S>
inline ostream& operator<<(ostream& os, const map<T, S> p) {
  for (auto el : p) cout << "[" << el.first << ";" << el.second << "]";
  return os;
}
template <typename T>
inline ostream& operator<<(ostream& os, const vector<T>& v) {
  for (auto el : v) cout << el << " ";
  return os;
}
template <typename T>
inline vector<T> fetch_vec(int sz) {
  vector<T> ret(sz);
  for (auto& elem : ret) cin >> elem;
  return ret;
}
int N, K, Q;
vector<ll> A;
void input() {
  fast_io();
  cin >> N >> K >> Q;
  A = fetch_vec<ll>(N);
}
int solve() {
  vector<ll> ans;
  ll maA = *max_element(A.begin(), A.end());
  for (int i = 0; i < N; i++) {
    ll y = A[i];
    if (y == maA) continue;
    vector<ll> miny;
    int le = 0;
    for (; le < N;) {
      while (A[le] < y && le < N) {
        le++;
      }
      int ri = le;
      while (A[ri] >= y && ri < N) {
        ri++;
      }
      if ((ri - le) >= K) {
        vector<ll> tmp;
        for (auto itr = (A.begin() + le); itr != (A.begin() + ri); ++itr) {
          tmp.push_back(*itr);
        }
        sort(tmp.begin(), tmp.end());
        for (int i = 0; i <= (ri - le - K); i++) {
          miny.push_back(tmp[i]);
        }
      }
      le = ri;
      if (le >= N) break;
    }
    if (!miny.empty() && miny.size() >= Q) {
      sort(miny.begin(), miny.end());
      ll X = miny[Q - 1];
      ans.push_back(X - y);
    }
  }
  ll ret = *min_element(ans.begin(), ans.end());
  cout << ret << endl;
  return 0;
}
int main() {
  input();
  solve();
  return 0;
}
