#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) template inline bool chmax(T&a,T b){if(a inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;} using ll = long long; ll t,a,b,idx,l=1; vector solve(ll a, ll b){ vector ret(1); while(l*2=0;i--)if(b & ll(1)<> t; while(t--){ cin >> a >> b; for(auto ans : solve(a,b)) cout << ans << endl; } }