#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int sg[N];
int main() {
  int T, n, k;
  scanf("%d", &T);
  while (T--) {
    scanf("%d %d", &n, &k);
    bool flag = true;
    if (k % 3 == 0) {
      int t = (k / 3 - 1) * 3 + 4;
      int s = n % t;
      if (s == t - 4)
        flag = false;
      else if (s < t - 4 && s % 3 == 0)
        flag = false;
    } else {
      if (n % 3 == 0) flag = false;
    }
    if (flag)
      printf("Alice\n");
    else
      printf("Bob\n");
  }
  return 0;
}
