ll@T;rep(T){ll@H,@W,@x,@y;if(H>W)swap(H,W),swap(x,y);wt((H==2&&W%4<1)||(H==34&&H*W%2<1)||(x+y)%2||(H==2&&(y-1)/2%2+(W-y)/2%2)||(H==W==3&&!(x==y==2))||(H==3==W-2&&x!=2&&y==3)?"Alice":"Bob");}