#include <bits/stdc++.h>
using namespace std;
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
string stin() {
  string s;
  cin >> s;
  return s;
}
long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
int main() {
  int n = in(), k = in(), q = in(), ans = INT_MAX;
  vector<int> a(n);
  for (int i = 0; i < n; i++) a[i] = in();
  for (auto y : a) {
    vector<int> v, u;
    for (int j = 0; j < n; j++) {
      if (a[j] < y || j == n - 1) {
        if (j == n - 1 & a[n - 1] >= y) v.push_back(a[n - 1]);
        if (v.size() >= k) {
          sort((v).begin(), (v).end());
          int x = 0;
          while (v.size() - x >= k) {
            u.push_back(v[x]);
            x++;
          }
        }
        v.clear();
      } else
        v.push_back(a[j]);
    }
    if (u.size() >= q) {
      for (int i = 0; i < u.size(); i++) cout << u[i] << " ";
      sort((u).begin(), (u).end());
      ans = min(ans, u[q - 1] - u[0]);
    }
  }
  cout << ans << endl;
}
