#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int op,n,chi;
cin>>op>>n>>chi;
if(op==1)cout<<(n<<chi)<<endl;
else cout<<(n>>chi)<<endl;
}
return 0;
}
// 64 位输出请用 printf("%lld")

京公网安备 11010502036488号