#include <bits/stdc++.h>
using namespace std;
int n, k, q;
vector<int> a;
int ans = 1 << 30;
int main() {
  cin >> n >> k >> q;
  for (long long int i = 0; i < (int)(n); i++) {
    int t;
    cin >> t;
    a.push_back(t);
  }
  for (long long int i = 0; i < (int)(n); i++) {
    vector<int> mi;
    vector<int> tmp;
    for (long long int r = 0; r < (int)(n + 1); r++) {
      if (r < n && a[r] >= a[i]) tmp.push_back(a[r]);
      if (r == n || a[r] < a[i]) {
        sort(tmp.begin(), tmp.end());
        for (long long int j = 0; j < (int)(tmp.size() - k + 1); j++) {
          mi.push_back(tmp[j]);
        }
        tmp.clear();
        continue;
      }
    }
    if (mi.size() < q) continue;
    ans = min(ans, mi[q - 1] - mi[0]);
  }
  cout << ans << endl;
}
