#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int T; cin >> T; rep(_,T) { ll A,B; cin >> A >> B; vector ans; while(A < B) { for(ll i = 60; i >= 0; i--) { ll P2 = (1LL << i); if(A % P2 == 0 && A + P2 <= B) { A += P2; ans.push_back(P2); break; } } } cout << ans.size() << "\n"; for(ll a : ans) cout << a << " "; cout << "\n"; } }