#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007, N = 2010;
long long int min2(long long int v1, long long int v2) {
  if (v1 == -1) return v2;
  if (v2 == -1) return v1;
  return min(v1, v2);
}
long long int n, k, Q, a[N], ans = -1;
int main() {
  cin >> n >> k >> Q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    vector<int> l2;
    for (int i2 = 1; i2 <= n;) {
      if (a[i2] < a[i]) {
        i2++;
        continue;
      }
      int si = i2;
      vector<int> ls;
      for (; a[i2] >= a[i]; i2++) {
        ls.push_back(a[i2]);
      }
      sort(ls.begin(), ls.end());
      for (int i3 = 0; i3 < ls.size() - k + 1; i3++) l2.push_back(ls[i3]);
    }
    sort(l2.begin(), l2.end());
    if (l2.size() >= Q) ans = min2(ans, l2[Q - 1] - a[i]);
  }
  cout << ans << endl;
  return 0;
}
