#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
using namespace std;
const int N = 50005;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
int t;
int n, k;
int main() {
  mt19937 myrand(chrono::steady_clock::now().time_since_epoch().count());
  cin >> t;
  while (t--) {
    scanf("%d%d", &n, &k);
    if (n < k || k % 3 != 0) {
      if (n % 3 == 0)
        printf("Bob\n");
      else
        printf("Alice\n");
    } else {
      n %= (k + 1);
      if (n == 0) {
        printf("Bob\n");
        continue;
      }
      if (n == k) {
        printf("Alice\n");
        continue;
      }
      if (n % 3 == 0)
        printf("Bob\n");
      else
        printf("Alice\n");
    }
  }
  return 0;
}
