#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int n, k, q;
vector<int> a;
int solve(int mn) {
  vector<vector<int> > b;
  vector<int> loc;
  for (int i = 0; i < n; ++i) {
    if (a[i] >= mn) {
      loc.push_back(a[i]);
    } else {
      if (!loc.empty()) {
        b.push_back(loc);
        loc.clear();
      }
    }
  }
  if (!loc.empty()) b.push_back(loc);
  vector<int> cand;
  for (int i = 0; i < (int)b.size(); ++i) {
    sort((b[i]).begin(), (b[i]).end());
    int m = (int)(b[i]).size();
    for (int j = 0; j < m - k + 1; ++j) {
      cand.push_back(b[i][j]);
    }
  }
  if ((int)(cand).size() < q) {
    return INF;
  }
  sort((cand).begin(), (cand).end());
  return cand[q - 1] - cand[0];
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  freopen("in.txt", "r", stdin);
  cin >> n >> k >> q;
  a.resize(n);
  set<int> s;
  for (int i = (0); i < (n); ++i) {
    cin >> a[i];
    s.insert(a[i]);
  }
  int ret = INF;
  for (auto mn : s) {
    ret = min(ret, solve(mn));
  }
  cout << ret << '\n';
  return 0;
}
