#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K, Q, ans = 1000000000;
  cin >> N >> K >> Q;
  vector<int> A(N);
  for (auto &i : A) cin >> i;
  for (int k = 0; k < N; k++) {
    vector<int> remove;
    int Y = A[k];
    int pos = 0;
    while (pos < N) {
      vector<int> AA;
      while (pos < N && A[pos] >= Y) AA.push_back(A[pos++]);
      sort(AA.begin(), AA.end());
      for (int j = 0; j < ((int)AA.size() - K + 1); j++)
        remove.push_back(AA[j]);
      pos++;
    }
    if (remove.size() >= Q) {
      int X = remove[Q - 1];
      ans = min(ans, X - Y);
    }
  }
  cout << ans << endl;
  return 0;
}
