#include <bits/stdc++.h>
const int INF = (int)1e9 + 10;
const long long MOD = (long long)1e9 + 7;
const long long LINF = (long long)4e18 + 20;
const long double PI = acos(-1.0);
const double EPS = 1e-9;
using namespace ::std;
void solve() {
  int N, K, Q;
  cin >> N >> K >> Q;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  int ans = INF;
  vector<int> temp(N);
  vector<int> temp2(N);
  for (int i = 0; i < N; ++i) {
    int X = A[i];
    int num = 0;
    int cnt = 0;
    for (int j = 0; j < N; ++j) {
      if (A[j] >= X) {
        temp2[cnt] = A[j];
        ++cnt;
      }
      if (A[j] < X || j + 1 == N) {
        int ter = cnt - K + 1;
        if (ter <= 0) {
          continue;
        } else {
          sort(temp2.begin(), temp2.begin() + cnt);
          for (int k = 0; k < ter; ++k) {
            temp[num] = temp2[k];
            ++num;
          }
        }
        cnt = 0;
      }
    }
    if (num >= Q) {
      sort(temp.begin(), temp.begin() + num);
      ans = min(ans, temp[Q - 1] - temp[0]);
    }
  }
  cout << ans << endl;
}
signed main(void) {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  std::cout << std::fixed;
  cout << setprecision(16);
  solve();
}
