#include <algorithm>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
 
#define FOR(i,k,n) for (int (i)=(k); (i)<(n); ++(i))
#define rep(i,n) FOR(i,0,n)
#define all(v) begin(v), end(v)
#define //debug(x) cerr<< #x <<": "<<x<<endl
#define debug2(x,y) cerr<< #x <<": "<< x <<", "<< #y <<": "<< y <<endl
 
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<ll> vll;
typedef vector<vector<ll> > vvll;
typedef deque<bool> db;
template<class T> using vv=vector<vector< T > >;

// cout vector
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size(); s << "\n";
  for (int i = 0; i < len; ++i) {
    s << v[i]; if (i < len - 1) s << "\t";
  }
  s << "\n"; return s;
}

// cout 2-dimentional vector
template<typename T> ostream& operator<<(ostream& s, const vector< vector<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) { s << vv[i]; }
  return s;
}

int n, k, q;

vvi b;

bool possible(int mid) {
  vi lis(mid+2);
  rep (i, mid) {
    lis[i] = b[i][1];
  }
  lis[mid] = -1;
  lis[mid+1] = n;
  sort(all(lis));
  int cnt = 0;
  debug(lis);
  rep (i, mid+1) {
    int d = lis[i+1] - lis[i] - 1;
    debug(d);
    cnt += max(0, d - k + 1);
  }
  if (cnt >= q) {
    return true;
  } else {
    return false;
  }
}

int main() {
  scanf("%d %d %d", &n, &k, &q);
  vi a(n);
  rep (i, n) {
    scanf("%d", &a[i]);
  }
  b.assign(n, vi(2));
  rep (i, n) {
    b[i][0] = a[i];
    b[i][1] = i;
  }
  sort(all(b));

  int l = 0; // possible
  int r = n-1; // impossible
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (possible(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  int ans = 1e9;
  debug(b);
  debug(l);
  debug(r);
  rep (i, r) {
    ans = min(ans, b[i + q - 1][0] - b[i][0]);
  }
  printf("%d\n", ans);

  return 0;
}
