#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  vector<int> a(n);
  vector<int> copy(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    copy[i] = a[i];
  }
  sort(copy.begin(), copy.end());
  int ans = 2000000000;
  for (int i = 0; i < (n - 1); i++) {
    vector<int> clear;
    int checker = -1;
    int j = 0;
    while (j < n) {
      if (a[j] < copy[i]) {
        if (j - 1 - checker < k) {
          checker = j;
          j++;
          continue;
        }
        vector<int> sub;
        for (int l = checker + 1; l < j; l++) {
          sub.push_back(a[l]);
        }
        sort(sub.begin(), sub.end());
        for (int l = 0; l < sub.size() - k + 1; l++) {
          clear.push_back(sub[l]);
        }
        checker = j;
        j++;
        continue;
      }
      j++;
    }
    vector<int> sub;
    for (int l = checker + 1; l < n; l++) {
      sub.push_back(a[l]);
    }
    if (sub.size() >= q) {
      sort(sub.begin(), sub.end());
      for (int l = 0; l < (sub.size() - k + 1); l++) {
        clear.push_back(sub[l]);
      }
    }
    if (clear.size() < q) {
      break;
    }
    sort(clear.begin(), clear.end());
    ans = min(ans, clear[q - 1] - clear[0]);
  }
  cout << ans << endl;
  return 0;
}
