#include using namespace std; #define int long long signed main(){ int Q; cin>>Q; while(Q--){ int a,b; cin>>a>>b; if(b==1){ cout<