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