inf = open("fraction.in", "r")
ouf = open("fraction.out", "w")

n, k, r = map(int, inf.readline().split())

def divide(x, y):
    r = [0] * (n + 1)
    v = 0
    for p, i in enumerate(x):
        v = v * 2 + i
        r[p] = v // y
        v = v % y
    return r

def mul(x, y):
    r = [0] * (n + 1)
    c = 0
    for i in range(n, -1, -1):
        c = c + x[i] * y
        r[i] = c % 2
        c = c // 2 
    return r

def rnd(x, k):
    r = x[:k + 1]
    if k + 1 < len(x) and x[k + 1] == 1:
        p = k
        while r[p] == 1:
            r[p] = 0
            p -= 1
        r[p] = 1
    return r

ans = []
one = [1] + [0] * n
onek = [1] + [0] * k
for f in range(1, r+1):
    a = divide(one, f)
    b = mul(a, f)
    c = rnd(b, k)
    if c != onek:
#        print(a, b, c, file = ouf)
        ans.append(f)

print(len(ans), file = ouf)
print(" ".join([str(x) for x in ans]), file = ouf)

inf.close()
ouf.close()

