#include using namespace std; using ll = long long; using P = pair; #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a> n; if(!n){ cout << -1 << '\n'; return 0; } int b = n&1; ll ans = 1; n >>= 1; while(n){ if(b != n%2) cout << ans << ' '; b = n%2; n >>= 1; ans <<= 1; } cout << ans << '\n'; return 0; }