#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  map<int, int> mp;
  pair<int, int> a[n];
  int x[n];
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i].first;
    a[i].second = i;
    x[i] = a[i].first;
  }
  sort(a, a + n);
  vector<int> v;
  v.push_back(n);
  int mi = a[q - 1].first - a[0].first;
  for (int i = 0; i < (int)(n); i++) {
    v.push_back(a[i].second);
    x[a[i].second] = inf;
    sort(v.begin(), v.end());
    int num = 0;
    int pos = 0;
    for (auto e : v) {
      num += max(0, e - pos - k);
      if (e - pos - k <= 0) {
        for (int j = pos; j < (int)(e); j++) x[i] = inf;
        pos = e;
      }
    }
    if (num >= q) {
      vector<int> ans;
      for (int i = 0; i < (int)(n); i++)
        if (x[i] != inf) ans.push_back(x[i]);
      sort(ans.begin(), ans.end());
      mi = min(mi, ans[q - 1] - ans[0]);
    }
  }
  cout << mi << endl;
  return 0;
}
