#include using namespace std; using ll=long long; using ld=long double; ll inf=10010010010010010; ll mod=1000000007; int main(){ ll a,b; cin >> a >> b ; ll x=min(a,b); ll y=max(a,b); while (1) { x/=2; y/=2; if (x==0) { if (y!=0) { cout << min(a,b) << endl; return 0; } break; } } x=1; while (x=x*2) { cout << x << endl; }else{ cout << x-1 << endl; } }else{ if (x-1==min(a,b)&&b!=a) { cout << x-1 << endl; return 0; } x/=2; x-=1; cout << x << endl; } }