#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e3 + 5;
int n, k, q;
int a[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k >> q;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int sol = 2e9;
  for (int i = 0; i < n; ++i) {
    vector<pair<int, int> > v;
    int left = -1;
    int bounds = a[i];
    for (int j = 0; j < n; ++j) {
      if (a[j] < bounds) {
        if (left != -1 && j - left >= k) {
          v.push_back(pair<int, int>(left, j));
        }
        left = -1;
      } else if (left == -1)
        left = j;
    }
    if (left != -1 && a[n - 1] >= bounds && n - left >= k)
      v.push_back(pair<int, int>(left, n - 1));
    vector<int> num;
    for (int curr = 0; curr < ((int)v.size()); ++curr) {
      vector<int> mini;
      for (int j = v[curr].first; j < v[curr].second + 1; ++j) {
        mini.push_back(a[j]);
      }
      sort(mini.begin(), mini.end());
      for (int j = 0; j < mini.size() - k + 1; ++j) num.push_back(mini[j]);
    }
    sort(num.begin(), num.end());
    if (num.size() < q) continue;
    int x = num[0];
    int y = num[q - 1];
    sol = min(sol, y - x);
  }
  cout << sol;
}
