#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
vector<long long> v;
signed main() {
  long long N, K, Q;
  cin >> N >> K >> Q;
  for (long long i = 0; i < N; ++i) {
    long long X;
    cin >> X;
    v.push_back(X);
  }
  long long mn = INF;
  for (long long lower : v) {
    long long L = -1;
    vector<long long> removed;
    for (long long R = 0; R < N; ++R) {
      if (R == N - 1 || v[R + 1] < lower) {
        if (L != -1) {
          vector<long long> sorted;
          for (long long i = L; i <= R; ++i) {
            sorted.push_back(v[i]);
          }
          sort(sorted.begin(), sorted.end());
          for (long long i = 0; i < (long long)sorted.size() - K + 1; ++i) {
            removed.push_back(sorted[i]);
          }
        }
        L = -1;
      } else if (L == -1) {
        if (R == 0 && v[R] >= lower)
          L = 0;
        else
          L = R + 1;
      }
    }
    if ((long long)removed.size() >= Q) {
      sort(removed.begin(), removed.end());
      mn = min(mn, removed[Q - 1] - removed[0]);
    }
  }
  cout << mn << endl;
}
