#include <bits/stdc++.h>
using namespace std;
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
string stin() {
  string s;
  cin >> s;
  return s;
}
long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
int main() {
  int n = in(), k = in(), q = in(), ans = INT_MAX;
  vector<int> a(n);
  for (int i = 0; i < n; i++) a[i] = in();
  for (int i = 0; i < n; i++) {
    int y = a[i];
    vector<int> que;
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] < y) continue;
      int l = j, r = j, t = 1;
      while (a[l] >= y) {
        if (l == 0) break;
        l--;
        if (a[l] >= a[j]) t++;
      }
      while (a[r] >= y) {
        if (r == n - 1) break;
        r++;
        if (a[r] >= a[j]) t++;
      }
      if (t >= k) {
        cnt++;
        que.push_back(a[j]);
      }
    }
    if (cnt >= q) {
      sort((que).begin(), (que).end());
      ans = min(ans, que[q - 1] - y);
    }
  }
  cout << ans << endl;
}
