#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
#define all(a) a.begin(),a.end()
#define INF 1e9

int n,k,q;
int res = INF;
vector<int> a;

void solve(int x){
    vector<int> select;
    priority_queue<int,vector<int>,greater<int>> qu;
    rep(i,n+1){
        if(a[i] < x){
            while(!qu.empty()){
                if((int)qu.size() >= k){
                    select.push_back(qu.top());
                }
                qu.pop();
            }
        }else{
            qu.push(a[i]);
        }
    }
    if((int)select.size() < q) return;
    sort(all(select));
    res = min(res, select[q-1]-select[0]);
}

int main(void){
    cin>>n>>k>>q;
    a.resize(n);
    rep(i,n) cin>>a[i];
    a.push_back(0);
    rep(i,n) solve(a[i]);
    cout<<res<<endl;
    return 0;
}
