#include <bits/stdc++.h>
using namespace std;
int n, k, q;
int a[2010];
int go(int x) {
  vector<pair<int, int>> b;
  for (int i = 0; i < n; i++) {
    if (a[i] == x) {
      int l = i, r = i;
      while (l >= 0 && a[l] >= x) l--;
      l++;
      while (r < n && a[r] >= x) r++;
      r--;
      if (r - l + 1 >= k) {
        b.push_back({l, r});
        i = r;
      }
    }
  }
  vector<int> c;
  for (auto u : b) {
    vector<int> tmp;
    for (int i = u.first; i <= u.second; i++) {
      tmp.push_back(a[i]);
    }
    sort(tmp.begin(), tmp.end());
    for (int i = 0; i < u.second - u.first + 1 - k + 1; i++) {
      c.push_back(tmp[i]);
    }
  }
  sort(c.begin(), c.end());
  if (c.size() >= q) return c[q - 1] - c[0];
  return INT_MAX;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) cin >> a[i];
  int mn = INT_MAX;
  for (int i = 0; i < n; i++) {
    mn = min(mn, go(a[i]));
  }
  cout << mn << endl;
}
