#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
const int maxm = 1e4 + 5;
int a[maxn];
int n, k, q;
int res = 2e9;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (fopen("A"
            ".INP",
            "r")) {
    freopen(
        "A"
        ".INP",
        "r", stdin);
    freopen(
        "A"
        ".OUT",
        "w", stdout);
  }
  cin >> n >> k >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) {
    vector<int> can, tmp;
    int now = a[i];
    for (int j = 1; j <= n + 1; ++j) {
      if (now > a[j] || j == n + 1) {
        sort(tmp.begin(), tmp.end());
        for (int c = 0; c + k - 1 < (int)tmp.size(); ++c) {
          can.push_back(tmp[c]);
        }
        tmp.clear();
      } else {
        tmp.push_back(a[j]);
      }
    }
    if (can.size() >= q) res = min(res, can[q - 1] - now);
  }
  cout << res;
}
