from bisect import bisect_left, bisect_right

N, K, Q = map(int, input().split())
A = [int(i) for i in input().split()]

ret = float('inf')
for i in range(N) :
    l = 0
    for j in range(i, max(-1, i - Q), -1) :
        if A[j] < A[i] :
            l = j + 1
            break
    r = N - 1        
    for j in range(i, min(N, i + Q + 1)) :
        if A[j] < A[i] :
            r = j - 1
            break
            
    if r - l + 1 < Q :
        continue
        
    B = A[::]
    B.pop(i)

    C = [-1]
    for j in range(N - 1) :
        if B[j] < A[i] :
            C.append(j)
    C.append(N - 1)

    D = []    
    for j in range(len(C) - 1) :
        if C[j+1] - C[j] - 1 >= K :
            D += sorted(B[C[j]+1:C[j+1]])[:C[j+1] - C[j] - K]
    
    if len(D) >= Q - 1 :
        D.sort()
        ret = min(ret, D[Q-2] - A[i])
        
print(ret)