#include <bits/stdc++.h>
using namespace std;
long long INF = LONG_LONG_MAX;
long long mod = 1000000000 + 7;
template <typename T, typename L>
void read(vector<T>& _data, L& _size, bool _shift) {
  _data.resize(_size + (long long)_shift);
  for (long long i = (long long)_shift; i < _size + (long long)_shift; i++)
    cin >> _data[i];
}
template <typename T, typename L>
void read(vector<vector<T>>& _data, L& _rows, L& _cols, bool _shiftRows,
          bool _shiftCols) {
  _data.resize(_rows + (long long)_shiftRows);
  for (long long i = 0; i < _rows + (long long)_shiftRows; i++)
    _data[i].resize(_cols + (long long)_shiftCols);
  for (long long i = (long long)_shiftRows; i < _rows + (long long)_shiftRows;
       i++)
    for (long long j = (long long)_shiftCols; j < _cols + (long long)_shiftCols;
         j++)
      cin >> _data[i][j];
}
template <typename T>
void write(vector<T>& _data, bool _shift) {
  for (long long i = (long long)_shift; i < _data.size(); i++)
    cout << _data[i] << " ";
  cout << endl;
}
void solve() {
  long long n, k, q;
  cin >> n >> k >> q;
  vector<long long> a;
  read(a, n, 0);
  long long ans = INF / 2;
  for (auto x : a) {
    vector<vector<long long>> split;
    int i = 0;
    while (i < n) {
      while (i < n && a[i] < x) i++;
      if (i >= n) break;
      split.push_back({});
      while (i < n && a[i] >= x) {
        split[split.size() - 1].push_back(a[i]);
        i++;
      }
    }
    vector<long long> all;
    for (auto v : split) {
      sort(v.begin(), v.end());
      int j = 0;
      while (j < (int)v.size() - k + 1) {
        all.push_back(v[j]);
        j++;
      }
    }
    if ((long long)all.size() >= q && a[0] == x)
      ans = min(ans, all[q - 1] - all[0]);
  }
  cout << ans << endl;
}
int main() {
  bool _multipleTestCases = false;
  if (_multipleTestCases) {
    long long t;
    cin >> t;
    while (t--) solve();
  } else {
    solve();
  }
  return 0;
}
