#include <cstdio>
#include <vector>
#include <cassert>
#include <cstring>

using namespace std;

#if 0
#define dbg(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#else
#define dbg(...) 
#endif

int pow2ModNum(int pow2, int v) {
    dbg("2^%d mod %d = ", pow2, v);
    int a = 2;
    int b = 1;
    while (pow2) {
        if (pow2 & 1) {
            b = (b * a) % v;
        }
        a = (a * a) % v;
        pow2 /= 2;
    }
    dbg("%d\n", b);
    return b;
}

typedef unsigned int uint;

bool pow2LessThanNum(int pow2, int num) {
    uint x = uint(1) << pow2;
    return x != 0 && x < uint(num);
}

bool pow2LessOrEqualThanNum(int pow2, int num) {
    uint x = uint(1) << pow2;
    return x != 0 && x <= uint(num);
}

bool isBadPrecision(int n, int k, int v) {
    dbg("isBadPrecision(%d, %d, %d)\n", n, k, v);
    assert(k <= n);

    int q = pow2ModNum(n, v);
    dbg("q = %d\n", q);
    if (q * 2 >= v) {
        return pow2LessOrEqualThanNum(n - k, 2 * (v - q));
    } else {
        return pow2LessThanNum(n - k, 2 * q);
    }
}

int main() {
    freopen("fraction.in", "r", stdin);
    freopen("fraction.out", "w", stdout);

    int n, k, r;
    scanf("%d%d%d", &n, &k, &r);
    vector <int> answers;
    for (int v = 1; v <= r; ++v) {
        if (isBadPrecision(n, k, v)) {
            answers.push_back(v);
        }
    }

    printf("%d\n", int(answers.size()));
    for (int i = 0; i < int(answers.size()); ++i) {
        printf("%d ", answers[i]);
    }
    printf("\n");

    return 0;
}
