#include <bits/stdc++.h>
using namespace std;
int n, k, q;
int a[(1 << 12)];
bool ok(long long d) {
  for (int i = 0; i < n; i++) {
    long long curl = a[i];
    long long curr = a[i] + d;
    int ii = 0;
    int cnt = 0;
    while (ii < n) {
      int jj = ii;
      int cntint = 0;
      int cntlarge = 0;
      while ((jj < n) && (a[jj] >= curl)) {
        if (a[jj] <= curr) {
          cntint++;
        } else {
          cntlarge++;
        }
        jj++;
      }
      int cntleft = max(0, k - 1 - cntlarge);
      int cur = cntint - cntleft;
      cnt += cur;
      ii = jj + 1;
    }
    if (cnt < q) {
      continue;
    }
    return true;
  }
  return false;
}
int main() {
  cout << fixed << setprecision(12);
  cin >> n >> k >> q;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int l = -1;
  int r = (1 << 30);
  while (r - l > 1) {
    int m = (l + r) / 2;
    if (!ok(m)) {
      l = m;
    } else {
      r = m;
    }
  }
  cout << r << endl;
  return 0;
}
long long MOD = ((long long)1e9 + 7);
struct mod {
  long long x;
  mod(long long tx = 0) {
    x = tx;
    x %= MOD;
  }
  mod& operator=(const long long& tx) {
    x = tx % MOD;
    return *this;
  }
  mod& operator=(const mod& m2) {
    x = m2.x;
    return *this;
  }
  mod operator+(const mod& m2) const { return mod((x + m2.x) % MOD); }
  mod& operator+=(const mod& m2) {
    x += m2.x;
    x %= MOD;
    return *this;
  }
  mod operator-(const mod& m2) const { return mod((x - m2.x + MOD) % MOD); }
  mod& operator-=(const mod& m2) {
    x -= m2.x;
    x = (x + MOD) % MOD;
    return *this;
  }
  mod operator*(const mod& m2) const { return mod((x * m2.x) % MOD); }
  mod& operator*=(const mod& m2) {
    x *= m2.x;
    x %= MOD;
    return *this;
  }
  mod mypow(long long k) const {
    mod ret = 1;
    mod cur = x;
    while (k) {
      if (k & 1) {
        ret *= cur;
      }
      cur *= cur;
      k >>= 1;
    }
    return ret;
  }
  mod inv() const { return mypow(MOD - 2); }
  mod operator/(const mod& m2) const { return (*this) * m2.inv(); }
  mod& operator/=(const mod& m2) {
    x *= m2.inv().x;
    x %= MOD;
    return *this;
  }
  bool operator<(const mod& m2) const { return x < m2.x; }
};
ostream& operator<<(ostream& os, const mod& m) { return os << m.x; }
