#include <bits/stdc++.h>
using namespace std;
const int INF = 20050208;
vector<int> a, b;
vector<vector<int> > remain;
int main() {
  int n, k, q;
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
    b.push_back(x);
  }
  int ans = 1e9;
  sort(b.begin(), b.end());
  for (int i = 0; i < n - k + 1; i++) {
    int x = b[i];
    vector<int> rest;
    rest.clear();
    remain.clear();
    int y = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] >= x) {
        rest.push_back(a[j]);
      } else {
        if (rest.size()) {
          remain.push_back(rest);
          rest.clear();
        }
      }
    }
    if (rest.size()) {
      remain.push_back(rest);
      rest.clear();
    }
    for (int j = 0; j < remain.size(); j++) {
      sort(remain[j].begin(), remain[j].end());
    }
    vector<int> tmp;
    for (int j = 0; j < remain.size(); j++) {
      if (remain[j].size() >= k) {
        for (int l = 0; l < remain[j].size(); l++) {
          tmp.push_back(remain[j][l]);
        }
      }
    }
    sort(tmp.begin(), tmp.end());
    if (tmp.size() >= q) {
      if (tmp[q - 1] - tmp[0] < ans) {
        ans = tmp[q - 1] - tmp[0];
      }
    }
  }
  cout << ans;
  return 0;
}
