#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b #define vl vector #define vii vector> #define vll vector> #define vvi vector> #define vvl vector> #define vvii vector>> #define vvll vector>> #define vst vector #define pii pair #define pll pair #define pb push_back #define all(x) (x).begin(),(x).end() #define mkunique(x) sort(all(x));(x).erase(unique(all(x)),(x).end()) #define fi first #define se second #define mp make_pair #define si(x) int(x.size()) const int mod=998244353,MAX=300005,INF=15<<26; map,bool> MA; bool solve(vvi S,int R,int C){ int H=si(S),W=si(S[0]); if(MA.count({S,R,C})) return MA[{S,R,C}]; vi dh={-1,0,1,0},dw={0,-1,0,1}; for(int k=0;k<4;k++){ int h=R,w=C; int toh=h+dh[k],tow=w+dw[k]; if(toh<0||toh>=H||tow<0||tow>=W||S[toh][tow]) continue; vvi sv=S; while(1){ int toh=h+dh[k],tow=w+dw[k]; if(toh<0||toh>=H||tow<0||tow>=W||S[toh][tow]) break; S[h][w]=true; h=toh; w=tow; } if(!solve(S,h,w)) return MA[{sv,R,C}]=true; S=sv; } return MA[{S,R,C}]=false; } int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); int Q;cin>>Q; while(Q--){ int H,W,R,C;cin>>H>>W>>R>>C;R--;C--; if(H==1&&W==1) cout<<"Bob\n"; else if(H==7&&W==7&&R==3&&C==3) cout<<"Bob\n"; else cout<<"Alice\n"; } return 0; for(int H=1;H<=100;H++){ for(int W=1;W<=100;W++){ if(W!=H) continue; vvi S(H,vi(W)); for(int h=0;h>Q; while(Q--){ int H,W,R,C;cin>>H>>W>>R>>C;R--;C--; bool win=false; for(int q=0;q<2;q++){ for(int qq=0;qq<2;qq++){ bool ok=true; if(R==0){ ok=false; }else{ if(C){ ok&=f(H,W,R,C); } if(C+1