#include <bits/stdc++.h>
using namespace std;
const long long int INF = (1LL << 50);
template <class S, class T>
std::ostream& operator<<(std::ostream& os, pair<S, T> a) {
  os << "(" << a.first << "," << a.second << ")";
  return os;
}
template <class T>
std::ostream& operator<<(std::ostream& os, vector<T> a) {
  os << "[ ";
  for (int i = 0; i < a.size(); i++) {
    os << a[i] << " ";
  }
  os << " ]";
  return os;
}
void solve(long long N, long long K, long long Q, std::vector<long long> A) {
  auto AA = A;
  sort(AA.begin(), AA.end());
  set<long long int> a(A.begin(), A.end());
  long long int ans = AA[Q - 1] - AA[0];
  for (auto x : a) {
    long long int l = 0, r = 0;
    vector<vector<long long int>::iterator> tmp;
    for (int j = 0; j < A.size(); j++) {
      if (A[j] <= x) {
        tmp.push_back(A.begin() + j);
      }
    }
    tmp.push_back(A.end());
    vector<long long int> prob;
    auto itr = A.begin();
    for (int j = 0; j < tmp.size(); j++) {
      vector<long long int> t(itr, tmp[j]);
      long long int tt = max(0LL, (long long int)t.size() - K + 1);
      if (tt != 0) {
        sort(t.begin(), t.end());
        for (int k = 0; k < tt; k++) {
          prob.push_back(t[k]);
        }
      }
      if (tmp[j] != A.end()) itr = next(tmp[j]);
    }
    if (prob.size() >= Q) {
      sort(prob.begin(), prob.end());
      ans = min(ans, prob[Q - 1] + prob[0]);
    } else {
      break;
    }
  }
  cout << ans << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  long long K;
  scanf("%lld", &K);
  long long Q;
  scanf("%lld", &Q);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, K, Q, std::move(A));
  return 0;
}
