#include <bits/stdc++.h>
using namespace std;
const int mn = 2e3 + 5;
int n, m, q;
int a[mn], b[mn];
int mini;
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), b[i] = a[i];
  sort(b + 1, b + n + 1);
  int ans = 1e9;
  a[n + 1] = -1;
  for (int i = 1; i <= n; i++) {
    int mini = b[i];
    int l = 0;
    vector<int> candelete;
    for (int j = 1; j <= n + 1; j++) {
      if (a[j] < b[i]) {
        if (j - l - 1 <= m) {
          l = j;
          continue;
        }
        vector<int> v;
        for (int k = l + 1; k < j; k++) {
          v.push_back(a[k]);
        }
        sort(v.begin(), v.end());
        for (int k = 1; k <= j - l - m; k++) {
          candelete.push_back(v[k - 1]);
        }
        l = j;
      }
    }
    sort(candelete.begin(), candelete.end());
    if (candelete.size() < q) break;
    ans = min(ans, candelete[q - 1] - mini);
  }
  cout << ans;
  return 0;
}
