#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  if (q == 1) {
    cout << 0 << endl;
    return 0;
  }
  int res = 1e9;
  for (int i = 0; i < n; i++) {
    int y = a[i];
    int cnt = 0;
    int toru = 0;
    multiset<int> buf;
    multiset<int> s;
    for (int j = 0; j <= n; j++) {
      if (j != n && a[j] >= y) {
        cnt++;
        buf.insert(a[j]);
      } else {
        bool danger = (j - cnt <= i && i <= j);
        if (cnt >= k) {
          toru += cnt - k + 1;
          int c = cnt - k + 1;
          for (auto &e : buf) {
            if (!c) break;
            s.insert(e);
            c--;
          }
          buf = multiset<int>();
        } else if (danger) {
          toru = -1e9;
        }
        cnt = 0;
      }
    }
    if (toru >= q) {
      int index = 0;
      int x;
      for (auto &e : s) {
        if (index == q - 1) {
          x = e;
        }
        index++;
      }
      res = min(res, x - y);
    }
  }
  cout << res << endl;
  return 0;
}
