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 = -1
    for j in range(i, max(-1, i - Q), -1) :
        if A[j] < A[i] :
            l = j
            break
    r = N      
    for j in range(i, min(N, i + Q)) :
        if A[j] < A[i] :
            r = j
            break
    # print(A[i], r, l)
    if r - l - 1 < Q :
        continue
        
    # print('最小値', i, A[i])
    B = A[::]
    B.pop(i)
    # print(B)
    
    C = [-1]
    for j in range(N - 1) :
        if B[j] < A[i] :
            C.append(j)
    C.append(N - 1)
    # print(C)
    
    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]
    # print(D)
    
    if len(D) >= Q - 1 :
        D.sort()
        ret = min(ret, D[Q-2] - A[i])
        # print(D[Q-2], A[i], ret)
    # print()

if ret == float('inf') :
    while True :
        pass
else :
    print(ret)