#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define sf scanf
#define pf printf
#define pb push_back
#define mp make_pair
#define PI ( acos(-1.0) )
#define mod 1000000007
#define maxn 200005
#define IN freopen("nocross.in","r",stdin)
#define OUT freopen("nocross.out","w",stdout)
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG pf("Hi\n")
#define INF 2000000000
#define i64 long long int
#define eps (1e-8)
#define xx first
#define yy second
#define ln 17
#define off 2

using namespace __gnu_pbds;
using namespace std ;

typedef tree< i64, null_type, less<i64>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

vector <i64> v ;
i64 a[2005] ;

int main()
{
    i64 i , j , k , l , m , n , q ;

    scanf("%lld %lld %lld",&n,&k,&q) ;

    for(i=1 ; i<=n ; i++) scanf("%lld",&a[i]) ;
    a[n+1] = -1 ;

    i64 ans = 2000000000LL ;

    for(i=1 ; i<=n ; i++)
    {
        i64 m  = a[i] ;
        for(j=1 ; j<=n+1 ; j++)
        {
            if( a[j]<m )
            {
                i64 sz = (i64)v.size() ;
                if( sz < q+k-1 )
                {
                    v.clear() ;
                    continue ;
                }
                sort(v.begin(),v.end()) ;
              //  for(l=0 ; l<v.size() ; l++) printf("%lld ",v[l]) ;
              //  printf("\n") ;
                ans = min( ans, v[q-1]-v[0] ) ;
                v.clear() ;
                continue ;
            }
            v.pb( a[j] ) ;
        }
    }

    printf("%lld\n",ans) ;

    return 0 ;
}
