#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = int(2e9);
const long long LINF = long long(2e9) * long long(2e9);
template <class T, class C>
void chmax(T& a, C b) {
  a > b ?: a = b;
}
template <class T, class C>
void chmin(T& a, C b) {
  a < b ?: a = b;
}
int main() {
  int N, K, Q;
  cin >> N >> K >> Q;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  multiset<int> MinTree;
  vector<int> Mins(N - (K - 1));
  sort(A.begin(), A.end());
  for (int i = 0; i < N - (K - 1); i++) Mins[i] = A[i];
  sort(Mins.begin(), Mins.end());
  vector<pair<int, pair<int, int>>> scores;
  for (int i = 0; i < Mins.size(); i++) {
    for (int j = i + 1; j < Mins.size(); j++) {
      int score = abs(Mins[i] - Mins[j]);
      scores.push_back(make_pair(score, make_pair(i, j)));
    }
  }
  sort(scores.begin(), scores.end());
  for (int i = 0; i < scores.size(); i++) {
    if (scores[i].second.second - scores[i].second.first + 1 >= Q) {
      cout << scores[i].first << endl;
      return 0;
    }
  }
  return 0;
}
