#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2345;
int a[MAXN];
int solve(int N, int cur, int Q, int k) {
  int l = 1;
  vector<int> ans;
  while (l <= N) {
    vector<int> tmp;
    while (a[l] >= cur && l <= N) {
      tmp.push_back(a[l]);
      l++;
    }
    sort(tmp.begin(), tmp.end());
    for (int i = 0; i < int(tmp.size()) - k + 1; i++) {
      ans.push_back(tmp[i]);
    }
    l++;
  }
  if (int(ans.size()) < Q)
    return int(1e9);
  else
    return ans[Q - 1] - cur;
}
int main() {
  int N, K, Q;
  while (~scanf("%d %d %d", &N, &K, &Q)) {
    for (int i = 1; i <= N; i++) {
      scanf("%d", &a[i]);
    }
    int ans = int(1e9);
    for (int i = 1; i <= N; i++) {
      ans = min(ans, solve(N, a[i], Q, K));
    }
    printf("%d\n", ans);
  }
  return 0;
}
