using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, x, y) = ((int)c[0], c[1], c[2]); if (y % 2 == 0) { if (x == y) { WriteLine(0); WriteLine(); } else { WriteLine(-1); } return; } var ones = BitList(y); var ans = new List{ n }; for (var i = 1; i < ones.Count; ++i) ans.Add(ones[i] - ones[i - 1]); WriteLine(ans.Count); WriteLine(string.Join(" ", ans)); } static List BitList(long n) { var bits = new List(); while (n > 0) { bits.Add((int)(n % 2)); n >>= 1; } bits.Reverse(); var ans = new List(); for (var i = 0; i < bits.Count; ++i) { if (bits[i] == 1) ans.Add(i); } return ans; } }