#include <bits/stdc++.h>
using namespace std;
int a[2001];
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  for (int i = (0); i < (n); ++i) cin >> a[i];
  int r = min(n, k + q - 1);
  int ans = 1000100010;
  for (int i = (0); i < (n); ++i) {
    int mn = 1000100010, mx = 0;
    vector<int> v;
    for (int j = (0); j < (r); ++j) {
      if (i + j == n) break;
      v.emplace_back(a[i + j]);
      if (j == r - 1) {
        sort(v.begin(), v.end());
        ans = min(ans, v[r - k] - v[0]);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
