def kth_combination(k, l, r):
    if (r == 0):
        return []
    elif (len(l) == r):
        return l
    else:
        i = ncr((len(l) - 1), (r - 1))
        if (k < i):
            return (l[0:1] + kth_combination(k, l[1:], (r - 1)))
        else:
            return kth_combination((k - i), l[1:], r)
def kth_combination(k, l, r):
    if (r == 0):
        return []
    elif (len(l) == r):
        return l
    else:
        i = ncr((len(l) - 1), (r - 1))
        if (k < i):
            return (l[0:1] + kth_combination(k, l[1:], (r - 1)))
        else:
            return kth_combination((k - i), l[1:], r)