#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& a) {
  return os << "(" << a.first << "," << a.second << ")";
}
template <class T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << (*i) << " ";
  cout << endl;
}
template <class T>
void chmin(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}
int nextInt() {
  int x;
  scanf("%d", &x);
  return x;
}
const int MAX_N = 2010;
const int INF = 1001001001;
int N, K, Q;
int A[MAX_N];
int w[MAX_N];
int solve(int X) {
  memset(w, (0), sizeof(w));
  for (int i = 0, _n = (int)(N); i < _n; ++i) {
    if (A[i] < X) {
      w[max(0, i - K + 1)]++;
      w[min(i + K, N)]--;
    }
  }
  for (int i = 0, _n = (int)(N); i < _n; ++i) w[i + 1] += w[i];
  vector<int> v;
  for (int i = 0, _n = (int)(N); i < _n; ++i)
    if (w[i] == 0) {
      v.push_back(A[i]);
    }
  if ((int)v.size() < Q) return INF;
  sort((v).begin(), (v).end());
  int res = v[Q - 1] - v[0];
  return res;
}
int main2() {
  N = nextInt();
  K = nextInt();
  Q = nextInt();
  for (int i = 0, _n = (int)(N); i < _n; ++i) A[i] = nextInt();
  if (Q == 1) {
    cout << 0 << endl;
    return 0;
  }
  int ans = INF;
  for (int i = 0, _n = (int)(N); i < _n; ++i) chmin(ans, solve(A[i]));
  cout << ans << endl;
  return 0;
}
int main() {
  for (; !cin.eof(); cin >> ws) main2();
  return 0;
}
