#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void output(T a, int p = 0) {
  if (p)
    cout << fixed << setprecision(p) << a << "\n";
  else
    cout << a << "\n";
}
template <typename T>
inline void voutput(T &v) {
  for (int i = (int)(0); i < (int)(v.size()); ++i) {
    if (i)
      cout << " " << v[i];
    else
      cout << v[i];
  }
  cout << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int N, K, Q;
  cin >> N >> K >> Q;
  vector<int> A(N);
  for (int i = (int)(0); i < (int)(N); ++i) cin >> A[i];
  int ans = 2000000007;
  for (int i = (int)(0); i < (int)(N); ++i) {
    vector<int> cur;
    vector<int> tmp;
    for (int j = (int)(0); j < (int)(N); ++j) {
      if (A[j] >= A[i])
        tmp.push_back(A[j]);
      else {
        if ((int)tmp.size() >= K) {
          sort((tmp).begin(), (tmp).end());
          for (int k = (int)(0); k < (int)((int)tmp.size() - K + 1); ++k) {
            cur.push_back(tmp[k]);
          }
          tmp.clear();
        }
      }
    }
    if ((int)tmp.size() >= K) {
      sort((tmp).begin(), (tmp).end());
      for (int k = (int)(0); k < (int)((int)tmp.size() - K + 1); ++k) {
        cur.push_back(tmp[k]);
      }
      tmp.clear();
    }
    if ((int)cur.size() >= Q) {
      sort((cur).begin(), (cur).end());
      ans = min(ans, cur[Q - 1] - A[i]);
    }
  }
  output(ans);
  return 0;
}
