#include <bits/stdc++.h>
using namespace std;
void Debug() { cout << '\n'; }
template <class FIRST, class... REST>
void Debug(FIRST arg, REST... rest) {
  cout << arg << " ";
  Debug(rest...);
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << "[";
  if (!v.empty()) {
    for (int i = int(0); i < int((int)(v).size() - 1); i++) out << v[i] << ", ";
    out << v.back();
  }
  out << "]";
  return out;
}
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& v) {
  out << "(" << v.first << ", " << v.second << ")";
  return out;
}
const int MAX_N = 200010;
const int MAX_V = 100010;
const double eps = 1e-6;
const long long mod = 1000000007;
const int inf = 1 << 29;
const long long linf = 1LL << 60;
const double PI = 3.14159265358979323846;
int N, K, Q;
int A[MAX_N], B[MAX_N];
void solve() {
  cin >> N >> K >> Q;
  for (int i = int(0); i < int(N); i++) {
    cin >> A[i];
    B[i] = A[i];
  }
  sort(B, B + N);
  int res = inf;
  for (int q = int(0); q < int(N); q++) {
    int c = B[q];
    vector<int> vec;
    vector<int> tmp;
    for (int i = int(0); i < int(N + 1); i++) {
      if (A[i] < c) {
        sort((tmp).begin(), (tmp).end());
        for (int i = int(0); i < int((int)(tmp).size() - K + 1); i++) {
          vec.push_back(tmp[i]);
        }
        tmp.clear();
      } else
        tmp.push_back(A[i]);
    }
    sort((vec).begin(), (vec).end());
    if ((int)(vec).size() >= Q) {
      res = min(res, vec[Q - 1] - vec[0]);
    }
  }
  cout << res << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed;
  cout.precision(20);
  srand((unsigned int)time(NULL));
  solve();
  return 0;
}
