#include <bits/stdc++.h>
using namespace std;
int n, k, q;
long long a[2000];
int main() {
  cin >> n >> k >> q;
  for (int i = (0); i < (n); ++i) cin >> a[i];
  long long ret = LLONG_MAX, mini;
  for (int i = (0); i < (n); ++i) {
    mini = a[i];
    int idx = 0;
    bool int_init = false;
    vector<long long> v, v_conn;
    while (1) {
      if (idx >= n) break;
      if ((a[idx] < mini || idx == i) && !int_init) {
        int_init = false;
      } else if (a[idx] < mini || idx == i) {
        sort(v_conn.begin(), v_conn.end());
        if ((long long)v_conn.size() - k + 1 > 0) {
          for (int i = (0); i < ((long long)v_conn.size() - k + 1); ++i)
            v.push_back(v_conn[i]);
        }
        int_init = false;
      } else if (int_init) {
        v_conn.push_back(a[idx]);
        if (idx == n - 1) {
          sort(v_conn.begin(), v_conn.end());
          if ((long long)v_conn.size() - k + 1 > 0) {
            for (int i = (0); i < ((long long)v_conn.size() - k + 1); ++i)
              v.push_back(v_conn[i]);
          }
        }
      } else {
        v_conn.erase(v_conn.begin(), v_conn.end());
        v_conn.push_back(a[idx]);
        int_init = true;
      }
      idx++;
    }
    sort(v.begin(), v.end());
    if (v.size() >= q - 1) {
      ret = min(ret, v[q - 2] - mini);
    }
  }
  cout << ret << endl;
  return 0;
}
