#include <bits/stdc++.h>
using namespace std;
int n, k, q;
vector<long long> a;
set<long long> mins;
bool f(long long x) {
  bool ret = false;
  for (auto it = mins.begin(); it != mins.end(); it++) {
    int ma = *it;
    vector<long long> ngs;
    for (int i = 0; i < n; i++)
      if (a[i] < ma) ngs.push_back(i);
    int c = 0;
    if (ngs.size() > 0) {
      for (int i = 0; i < n; i++) {
        auto it2 = lower_bound(ngs.begin(), ngs.end(), i);
        bool ok = false;
        if (it2 == ngs.end()) {
          it2--;
          if (*it2 + k < n) {
            ok = true;
          }
        } else {
          int big = *it2;
          it2--;
          int sml = *it2;
          if ((big - i - 1) + (i - sml - 1) + 1 >= k) {
            ok = true;
          }
        }
        if (ok) {
          int right = min(n - 1, i + k - 1);
          for (int j = i + k; j < n; j++) {
            auto it3 = lower_bound(ngs.begin(), ngs.end(), i);
            bool ok2 = false;
            if (it3 == ngs.end()) {
              it3--;
              if (*it3 + k < n) {
                ok = true;
              }
            } else {
              int big = *it3;
              it3--;
              int sml = *it3;
              if ((big - j - 1) + (j - sml - 1) + 1 >= k) {
                ok = true;
              }
            }
            if (ok2) {
              right = j;
            } else {
              break;
            }
          }
          int d = 0;
          for (int j = i; j <= right; j++) {
            if (ma <= a[j] && a[j] <= ma + x) d++;
          }
          d = min(d, right - i + 1 - k);
          c += d;
          i = right + 1;
        } else {
          continue;
        }
      }
    } else {
      for (int i = 0; i < n; i++)
        if (a[i] <= ma + x) c++;
    }
    if (c >= q) ret = true;
  }
  return ret;
}
int main() {
  cin >> n >> k >> q;
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    long long minA = 1000000001;
    for (int j = 0; j < k && i + j < n; j++) {
      minA = min(minA, a[i + j]);
    }
    mins.insert(minA);
  }
  long long minS = 1000000001, maxS = -1;
  while (minS - maxS > 1) {
    int s = (maxS + minS) / 2;
    if (f(s)) {
      minS = s;
    } else {
      maxS = s;
    }
  }
  cout << minS << endl;
  return 0;
}
