#include <bits/stdc++.h>
using namespace std;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  vector<int> num(n);
  for (int i = (0); (n) > i; i++) {
    scanf("%d", &num[i]);
  }
  int ans = INT_MAX;
  for (int cc = (0); (n) > cc; cc++) {
    int base = num[cc];
    int con = 1;
    for (int i = (cc + 1); (n) > i; i++) {
      if (num[i] >= base)
        con++;
      else
        break;
    }
    for (int i = cc - 1; 0 <= i; i--) {
      if (num[i] >= base)
        con++;
      else
        break;
    }
    if (con < k) continue;
    int Min = INT_MAX;
    int canc = 0;
    int cur = 0;
    vector<int> cand;
    for (int i = (0); (n) > i; i++) {
      if (num[i] >= base) {
        cur++;
      } else if (cur) {
        canc += max(0, cur - k + 1);
        if (cur - k + 1 > 0) {
          priority_queue<int, vector<int>, greater<int>> pq;
          for (int j = (i - cur); (i) > j; j++) {
            pq.push(num[j]);
          }
          for (int j = (0); (cur - k + 1) > j; j++) cand.push_back(pq.top());
        }
        cur = 0;
      }
    }
    sort((cand).begin(), (cand).end());
    canc += max(0, cur - k + 1);
    if (cur - k + 1 > 0) {
      multiset<int> pq;
      for (int j = (n - cur); (n) > j; j++) {
        pq.insert(num[j]);
      }
      auto itr = pq.begin();
      for (int j = (0); (cur - k + 1) > j; j++) {
        cand.push_back(*itr);
        itr++;
      }
    }
    if (canc >= q) {
      ans = min(ans, cand[q - 1] - base);
    }
  }
  cout << ans << endl;
  return 0;
}
