#include <bits/stdc++.h>
using namespace std;
int a[3] = {0, 1, 2};
int main(void) {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n, k, ans;
    scanf("%d%d", &n, &k);
    if (k % 3 != 0) {
      ans = a[n % 3];
    } else {
      int t = n % (k + 1);
      ans = a[t % 3];
      if (t == k) ans = 3;
    }
    printf("%s\n", (ans != 0 ? "Alice" : "Bob"));
  }
  return 0;
}
