#include <bits/stdc++.h>
using namespace std;
template <typename T>
string join(vector<T>& v) {
  stringstream s;
  for (int i = (0); i < ((int)(v).size()); i++) s << ' ' << v[i];
  return s.str().substr(1);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& v) {
  fill((T*)array, (T*)(array + N), v);
}
template <typename T>
T gcd(T a, T b) {
  if (a > b) swap(a, b);
  for (; a > 0; b %= a, swap(a, b))
    ;
  return b;
}
long long modpow(__int128_t a, __int128_t n, long long m) {
  if (a == 0) return a;
  __int128_t p = 1;
  for (; n > 0; n /= 2, a = a * a % m)
    if (n & 1) p = p * a % m;
  return (long long)p;
}
void dout(double d) { printf("%.12f\n", d); }
const int iinf = 1e9;
const long long linf = 1e18;
const int mod = 1e9 + 7;
const double pi = acos(-1);
const double eps = 1e-10;
int n, k, q, a[2005];
vector<int> v, vv;
bool b[2005];
map<int, vector<int> > m;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> k >> q;
  for (int i = (0); i < (n); i++) {
    cin >> a[i];
    if (m.find(a[i]) == m.end()) m[a[i]] = vector<int>();
    m[a[i]].push_back(i);
  }
  b[n] = true;
  int ans = iinf;
  for (__typeof((m).begin()) itr = (m).begin(); itr != (m).end(); itr++) {
    v.resize(0);
    int c = 0;
    for (int i = (0); i < (n + 1); i++) {
      if (b[i]) {
        if (i - c >= k) {
          sort((vv.begin()), (vv.end()));
          for (int j = (0); j < (i - c - k + 1); j++) v.push_back(vv[j]);
        }
        vv.resize(0);
        c = i + 1;
      } else {
        vv.push_back(a[i]);
      }
    }
    if ((int)(v).size() < q) break;
    if (v[0] == itr->first) {
      sort((v.begin()), (v.end()));
      ans = min(ans, v[q - 1] - itr->first);
    }
    for (__typeof((itr->second).begin()) itrr = (itr->second).begin();
         itrr != (itr->second).end(); itrr++)
      b[*itrr] = true;
  }
  cout << ans << endl;
  return 0;
}
