#include using namespace std; //* ATCODER #include using namespace atcoder; typedef modint998244353 mint; //*/ /* BOOST MULTIPRECISION #include using namespace boost::multiprecision; //*/ typedef long long ll; #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) template bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template T max(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmax(ret, a[i]); return ret; } template T min(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmin(ret, a[i]); return ret; } template T sum(vector &a){ T ret = 0; for (int i=0; i<(int)a.size(); i++) ret += a[i]; return ret; } ll floor_sqrt(ll n){ ll ub = 3e9 + 30; ll lb = 0; while(ub - lb > 1){ ll t = (ub + lb) / 2; if (t * t <= n){ lb = t; }else{ ub = t; } } return lb; } //defmodfact const int COMinitMAX = 992844; mint fact[COMinitMAX+1], factinv[COMinitMAX+1]; void modfact(){ fact[0] = 1; for (int i=1; i<=COMinitMAX; i++){ fact[i] = fact[i-1] * i; } factinv[COMinitMAX] = fact[COMinitMAX].inv(); for (int i=COMinitMAX-1; i>=0; i--){ factinv[i] = factinv[i+1] * (i+1); } } mint cmb(int a, int b){ if (a(w))); vector tansaku(1<<(h*w), vector(h, vector(w))); vector dx = {-2, -2, -1, -1, 1, 1, 2, 2}; vector dy = {-1, 1, -2, 2, -2, 2, -1, 1}; auto dp = [&](auto self, int dat, int x, int y) -> bool { if (tansaku[dat][x][y]){ return game[dat][x][y]; } rep(i,0,8){ int xx = x + dx[i]; int yy = y + dy[i]; if (0 <= xx && xx < h){ if (0 <= yy && yy < w){ if ((dat >> (xx * w + yy) & 1) == 0){ if (!self(self, dat | (1 << (xx * w + yy)), xx, yy)){ game[dat][x][y] = true; tansaku[dat][x][y] = true; return true; } } } } } game[dat][x][y] = false; tansaku[dat][x][y] = true; return false; }; rep(i,0,h){ rep(j,0,w){ if (dp(dp,1<<(i*w+j),i,j)){ cout << 1; }else{ cout << 0; } } cout << endl; } } void solve(){ int H, W; cin >> H >> W; int x, y; cin >> x >> y; x--; y--; if (H > W){ swap(H, W); swap(x, y); } if (H == 1){ cout << "Bob\n"; }else if (H == 2){ int lftmoval = y / 2; int rgtmoval = (W-y-1) / 2; if (lftmoval % 2 == 1 || rgtmoval % 2 == 1){ cout << "Alice\n"; }else{ cout << "Bob\n"; } }else if (H == 3 && W == 3){ vector> ans = { {1, 1, 1}, {1, 0, 1}, {1, 1, 1} }; if (ans[x][y] == 1){ cout << "Alice\n"; }else{ cout << "Bob\n"; } }else if (H == 3 && W == 5){ vector> ans = { {0, 1, 1, 1, 0}, {1, 0, 1, 0, 1}, {0, 1, 1, 1, 0} }; if (ans[x][y] == 1){ cout << "Alice\n"; }else{ cout << "Bob\n"; } }else if (H * W % 2 == 0){ cout << "Alice\n"; }else{ if ((x + y) % 2 == 0){ cout << "Bob\n"; }else{ cout << "Alice\n"; } } } int main(){ int t; cin >> t; while(t--) solve(); }