#include <bits/stdc++.h>
using namespace std;
const int MAX = 2005;
int N, K, Q, A[MAX];
int main() {
  scanf("%d %d %d", &N, &K, &Q);
  for (int i = 1; i <= N; i++) {
    scanf("%d", A + i);
  }
  int ans = 1e9;
  for (int i = 1; i <= N; i++) {
    vector<int> vt;
    int bef = 0;
    for (int j = 1; j <= N; j++) {
      if (A[j] < A[i]) {
        if (bef == 0) continue;
        vector<int> tvt;
        for (int k = bef; k < j; k++) tvt.push_back(A[k]);
        sort(tvt.begin(), tvt.end());
        for (int k = bef; k + K - 1 < j; k++) vt.push_back(tvt[k - bef]);
        bef = 0;
      } else if (bef == 0)
        bef = j;
    }
    if (bef != 0) {
      vector<int> tvt;
      if (N - bef >= K) {
        for (int k = bef; k <= N; k++) tvt.push_back(A[k]);
        sort(tvt.begin(), tvt.end());
        for (int k = bef; k + K - 1 <= N; k++) vt.push_back(tvt[k - bef]);
      }
    }
    sort(vt.begin(), vt.end());
    if (vt.size() < Q)
      continue;
    else {
      ans = min(ans, vt[Q - 1] - vt[0]);
    }
  }
  printf("%d\n", ans);
  return 0;
}
