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

ans = 10**9
for i in range(N):
    temp = []
    temp2 = []
    for j in range(N):
        if A[j] < A[i]:
            temp.append(temp2)
            temp2 = []
        else:
            temp2.append(A[j])
    temp.append(temp2)

    temp2 = temp
    temp = []
    for j in range(len(temp2)):
        temp += sorted(temp2[j])[:min(len(temp2[j]),max(0,len(temp2[j]) - K + 1))]
    temp = sorted(temp)

    if len(temp) > Q - 1:
        ans = min(ans,temp[Q - 1] - A[i])
        
print(ans)
    
