#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = mod * mod;
const long double eps = 1e-8;
const long double pi = acos(-1.0);
void solve() {
  int N, K, Q;
  cin >> N >> K >> Q;
  vector<int> A(N), B(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    B[i] = A[i];
  }
  sort(B.begin(), B.end());
  int ans = B[Q - 1] - B[0];
  for (int i = 0; i < N; i++) {
    int X = A[i];
    A.erase(A.begin() + i);
    vector<int> vec, res;
    res.push_back(X);
    for (int j = 0; j < N - 1; j++) {
      if (A[j] >= X) {
        vec.push_back(A[j]);
      }
      if (A[j] < X || j == N - 1) {
        sort(vec.begin(), vec.end());
        int M = vec.size();
        for (int k = 0; k < M - K + 1; k++) {
          res.push_back(vec[k]);
        }
        vec.resize(0);
      }
    }
    sort(res.begin(), res.end());
    if (Q > res.size()) continue;
    int Y = res[Q - 1];
    int ret = Y - X;
    ans = min(ans, ret);
    A.insert(A.begin() + i, X);
  }
  cout << ans << endl;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
