#include <bits/stdc++.h>
using namespace std;
int n, k, q;
int a[2009], b[2009];
int main() {
  cin >> n >> k >> q;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int ans = 1e9;
  for (int i = 1; i <= n; i++) {
    int l = 0, x = a[i];
    vector<int> VV;
    for (int j = 1; j <= n + 1; j++) {
      if (a[j] < x || j == n + 1) {
        vector<int> V;
        for (int i = l + 1; i < j; i++) {
          V.push_back(a[i]);
        }
        if (!V.size()) continue;
        sort(V.begin(), V.end());
        for (int i = 0; i < (int)V.size() - k + 1; i++) VV.push_back(V[i]);
        l = j;
      }
    }
    sort(VV.begin(), VV.end());
    if (VV.size() < q) continue;
    ans = min(ans, VV[q - 1] - VV[0]);
  }
  cout << ans << endl;
}
