from collections import defaultdict
def main():
    n, k, q = map(int, raw_input().split())
    a = map(int, raw_input().split())
    d = defaultdict(list)
    for i, x in enumerate(a):
        d[x].append(i)
    a.append(-1)
    ans = 1001001001
    for x in sorted(d.keys()):
        p = 0
        b = []
        s = 0
        for j, y in enumerate(a):
            if y < x:
                if j - p >= k:
                    t = a[p:j]
                    t.sort()
                    b.extend(t[:j-p-k+1])
                p = j + 1
        if len(b) >= q:
            b.sort()
            ans = min(ans, b[q-1] - x)
        else:
            break
    print ans
main()
