#include <bits/stdc++.h>
using namespace std;
int t;
int read() {
  int t = 1, s = 0;
  char c = getchar();
  while ((c > '9' || c < '0') && c != '-') c = getchar();
  if (c == '-') t = -1, c = getchar();
  while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();
  return s * t;
}
int main(void) {
  scanf("%d", &t);
  while (t--) {
    int a, b;
    scanf("%d %d", &a, &b);
    if (b % 3 != 0) {
      if (a % 3 == 0)
        printf("Bob\n");
      else
        printf("Alice\n");
    }
    if (b % 3 == 0) {
      if (a % (b + 1) == b || (a % (b + 1)) % 3 != 0)
        printf("Alice\n");
      else
        printf("Bob\n");
    }
  }
}
