#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  vector<int> a(n, 0);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int ans = 2e9;
  for (int i = 0; i < n; ++i) {
    vector<int> b;
    vector<int> cur;
    for (int j = 0; j < n + 1; ++j) {
      if (j == n || a[j] < a[i]) {
        if ((int)cur.size() >= k) {
          int len = cur.size();
          sort(cur.begin(), cur.end());
          for (int jj = 0; jj < len - k + 1; ++jj) {
            b.push_back(cur[jj]);
          }
          cur.clear();
        }
      } else {
        cur.push_back(a[j]);
      }
    }
    int len = b.size();
    if (len >= q) {
      ans = min(ans, b[q - 1] - a[i]);
    }
  }
  cout << ans << '\n';
}
