N, K, Q = map(int, input().split())
As = list(map(int, input().split()))

ans = 10 ** 9
for Y in As:
    cands = []
    cs = []
    for A in As + [0]: # 最終要素は番兵
        if A < Y:
            cands += sorted(cs)[:max(0, len(cs) - K + 1)]
            cs = []
        else:
            cs += [A]

    if len(cands) < Q: continue
    X = sorted(cands)[Q - 1]

    ans = min(ans, X - Y)

print(ans)
