#include <bits/stdc++.h>
using namespace std;
template <class T>
using vv = vector<vector<T> >;
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size();
  s << "\n";
  for (int i = 0; i < len; ++i) {
    s << v[i];
    if (i < len - 1) s << "\t";
  }
  s << "\n";
  return s;
}
template <typename T>
ostream& operator<<(ostream& s, const vector<vector<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) {
    s << vv[i];
  }
  return s;
}
int n, k, q;
vector<int> a;
vector<vector<int> > b;
int possible(int mid) {
  vector<int> lis(mid + 2);
  for (int(i) = (0); (i) < (mid); ++(i)) {
    lis[i] = b[i][1];
  }
  lis[mid] = -1;
  lis[mid + 1] = n;
  sort(begin(lis), end(lis));
  vector<int> elems = {};
  for (int(i) = (0); (i) < (mid + 1); ++(i)) {
    int d = lis[i + 1] - lis[i] - 1;
    int add = max(0, d - k + 1);
    if (add == 0) {
      continue;
    }
    vector<int> tmp = {};
    tmp.insert(tmp.end(), a.begin() + lis[i] + 1, a.begin() + lis[i + 1]);
    sort(begin(tmp), end(tmp));
    elems.insert(elems.end(), tmp.begin(), tmp.begin() + d - k + 1);
  }
  if ((int)elems.size() < q) {
    return -1;
  }
  return elems[q - 1] - elems[0];
}
int main() {
  scanf("%d %d %d", &n, &k, &q);
  a.resize(n);
  for (int(i) = (0); (i) < (n); ++(i)) {
    scanf("%d", &a[i]);
  }
  b.assign(n, vector<int>(2));
  for (int(i) = (0); (i) < (n); ++(i)) {
    b[i][0] = a[i];
    b[i][1] = i;
  }
  sort(begin(b), end(b));
  int ans = b[q - 1][0] - b[0][0];
  for (int i = 1; i < n; ++i) {
    for (int(j) = (0); (j) < (i); ++(j)) {
      int check = possible(j + 1);
      if (check == -1) {
        break;
      }
      ans = min(ans, check);
    }
  }
  printf("%d\n", ans);
  return 0;
}
