import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class fraction_vd {

	static final BigInteger TWO = BigInteger.valueOf(2);

	boolean mustIncrease(BigInteger a, int n, BigInteger x) {
		a = a.multiply(TWO);
		a = a.add(BigInteger.ONE);
		a = a.multiply(x);
		return a.compareTo(TWO.pow(n + 1)) <= 0;
	}

	boolean bad(int number, int n, int k) {
		BigInteger x = BigInteger.valueOf(number);
		BigInteger a = TWO.pow(n).divide(x);
		if (mustIncrease(a, n, x)) {
			a = a.add(BigInteger.ONE);
		}
		a = a.multiply(x);
		BigInteger b = a.divide(TWO.pow(n - k));
		if (k < n && a.testBit(n - k - 1)) {
			b = b.add(BigInteger.ONE);
		}
		return !b.equals(TWO.pow(k));
		// 1/x == a/2^n
	}

	public void solve() throws IOException {
		int n = nextInt();
		int k = nextInt();
		int r = nextInt();
		ArrayList<Integer> arr = new ArrayList<>();
		for (int i = 2; i <= r; i++) {
			if (bad(i, n, k)) {
				arr.add(i);
			}
		}
		out.println(arr.size());
		if (arr.size() > 0) {
			for (int i = 0; i < arr.size() - 1; i++) {
				out.print(arr.get(i) + " ");
			}
			out.println(arr.get(arr.size() - 1));
		} else {
			out.println();
		}
	}

	public void run() throws IOException {
		br = new BufferedReader(new FileReader("fraction.in"));
		out = new PrintWriter("fraction.out");
		solve();
		out.close();
		br.close();
	}

	public static void main(String[] args) throws IOException {
		new fraction_vd().run();
	}

	BufferedReader br;
	StringTokenizer str;
	PrintWriter out;

	String next() throws IOException {
		while (str == null || !str.hasMoreTokens()) {
			str = new StringTokenizer(br.readLine());
		}
		return str.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

}
