#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
bool cmin(A &a, const B &b) {
  return a > b ? (a = b, true) : false;
}
template <typename A, typename B>
bool cmax(A &a, const B &b) {
  return a < b ? (a = b, true) : false;
}
const double PI = acos(-1);
const double EPS = 1e-9;
long long inf = sizeof(long long) == sizeof(long long) ? 1e14 : 1e9 + 10;
long long dx[] = {0, 1, 0, -1};
long long dy[] = {1, 0, -1, 0};
const long long defvalue = 0;
class SegTree {
 private:
  vector<long long> val;
  long long n;
  long long combine(long long a, long long b) { return a + b; }

 public:
  SegTree(long long size) {
    n = 1;
    while (n < size) n <<= 1;
    val = vector<long long>(2 * n, defvalue);
  }
  SegTree(const vector<long long> &in) {
    n = 1;
    while (n < in.size()) n <<= 1;
    val = vector<long long>(2 * n, defvalue);
    for (long long i = n - 1 + in.size() - 1; i >= 0; i--) {
      if (n - 1 <= i)
        val[i] = in[i - (n - 1)];
      else
        val[i] = combine(val[i * 2 + 1], val[i * 2 + 2]);
    }
  }
  void update(long long i, long long a) {
    i += n - 1;
    val[i] += a;
    while (i > 0) {
      i = (i - 1) / 2;
      val[i] = combine(val[i * 2 + 1], val[i * 2 + 2]);
    }
  }
  long long query(long long a, long long b, long long k = 0, long long l = 0,
                  long long r = -1) {
    if (r == -1) r = n;
    if (r <= a || b <= l) return defvalue;
    if (a <= l && r <= b)
      return val[k];
    else
      return combine(query(a, b, k * 2 + 1, l, (l + r) / 2),
                     query(a, b, k * 2 + 2, (l + r) / 2, r));
  }
  void tmp() {
    for (long long i = 0; i < val.size(); i++) cout << " " << val[i];
    cout << endl;
  }
};
signed main() {
  long long n, k, q;
  cin >> n >> k >> q;
  vector<long long> in(n);
  for (long long i = 0; i < n; i++) cin >> in[i];
  long long l = 0, r = 1000000010;
  while (r - l > 1) {
    long long h = (l + r) / 2;
    bool H = false;
    for (long long i = 0; i < n; i++) {
      SegTree st(n);
      for (long long j = 0; j < n; j++)
        if (in[j] < in[i])
          st.update(j, inf);
        else if (in[j] <= in[i] + h)
          st.update(j, 1);
      long long co = 0;
      for (long long j = 0; j < n; j++)
        if (j + k <= n) {
          long long t = st.query(j, j + k);
          if (t < inf && t) {
            co++;
            st.update(j + k - 1, -1);
          }
        }
      if (co >= q) H = true;
    }
    if (H)
      r = h;
    else
      l = h;
  }
  cout << r << endl;
}
