#include <bits/stdc++.h>

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl

typedef long long ll;

using namespace std;

const int INF = 1e9,MOD = 1e9 + 7,ohara = 1e6;
const ll LINF = 1e18;
long long int n,cnt=0,ans=LINF,a[ohara],b,c,d,cmp,cmpp,m,h,w,x,y,sum=0,pos,q,mi,k,anss[ohara],cntt=0;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

int main(void){
       cin.tie(0);
    ios::sync_with_stdio(false);
      
      cin>>n>>k>>q;
      rep(i,n)cin>>a[i];
      rep(i,n){
        mi=a[i];
        ll cmp[n+1]={},anss[n+1]={};
        cnt=0;
        rep(j,n){
          if(mi>a[j]||j==n-1){
            if(j==n-1&&mi<a[j])cmp[cnt++]=a[j];
            if(cnt>=k){
              sort(cmp,cmp+cnt);
              rep(l,cnt-k+1)anss[cntt++]=cmp[l];
              cnt=0;
            }
            cnt=0;
          }
          else cmp[cnt++]=a[j];
        }
        sort(anss,anss+cntt);
        if(cntt>=q){
        ans=min(ans,anss[q-1]-mi);
        }
        cntt=0;
      }
      if(n==1)Cout(0);
      else{
      if(ans<0)ans=0;
      Cout(ans);
      }
    
       
return 0;
}
