#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; long long x, y; cin >> n >> x >> y; if (x == y) { cout << "0\n\n"; return 0; } if (y % 2 == 0) { cout << "-1\n"; return 0; } vector ans(1, n); vector sigs; for (int i = n - 1; i >= 0; i--) { if ((y >> i) & 1) { sigs.push_back(i); } } for (int i = 0; i < (int)sigs.size() - 1; i++) { ans.push_back(sigs[i] - sigs[i + 1]); } cout << ans.size() << '\n'; for (int i : ans) { cout << i << ' '; } cout << endl; }