#include <bits/stdc++.h>
using namespace std;
int n, k, q;
int x, y;
vector<long long> a;
int main(void) {
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    a.push_back(temp);
  }
  int ans = 1000000001;
  for (int i = 0; i < n; i++) {
    int x = a[i];
    int temp_ans = 1000000001;
    vector<int> b;
    for (int j = 0; j < n; j++) {
      if (j != i) b.push_back(a[j]);
    }
    vector<int> sub;
    for (auto e : b) {
      if (e < x) {
        if (sub.size() >= k + q - 1) {
          sort(sub.begin(), sub.end());
          temp_ans = sub[q - 2] - x;
          ans = min(temp_ans, ans);
        }
        vector<int> sub(0, 0);
        continue;
      }
      sub.push_back(e);
    }
    if (sub.size() >= k + q - 1) {
      sort(sub.begin(), sub.end());
      temp_ans = sub[q - 2] - x;
      ans = min(temp_ans, ans);
    }
  }
  cout << ans << endl;
}
