#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1010000;
const long long MOD = (long long)1000000000 + 7;
const long long INF = 1e17;
const double pi = acos(-1);
const double EPS = 1e-10;
long long dx[4] = {0, 0, 1, -1};
long long dy[4] = {
    1,
    -1,
    0,
    0,
};
long long N, K, Q;
vector<long long> A;
signed main() {
  cin >> N >> K >> Q;
  A.resize(N);
  for (long long i = 0; i < N; i++) cin >> A[i];
  A.push_back(-INF);
  long long l = 0, r = 0;
  long long ans = INF;
  for (long long i = 0; i < N; i++) {
    vector<long long> res;
    long long x = A[i];
    l = 0, r = 0;
    while (r < N) {
      if (A[r + 1] >= x) {
        r++;
      } else {
        if (r - l + 1 >= K) {
          vector<long long> vec;
          for (long long j = l; j <= r; j++) {
            vec.push_back(A[j]);
          }
          sort(vec.begin(), vec.end());
          ;
          for (long long k = 0; k < r - l + 2 - K; k++) {
            res.push_back(vec[k]);
          }
        }
        l = r + 2;
        r += 2;
      }
    }
    sort(res.begin(), res.end());
    ;
    if (res.size() >= Q) {
      ans = min(ans, res[Q - 1] - res[0]);
    }
  }
  cout << ans << endl;
  ;
}
