#include <bits/stdc++.h>
using namespace std;
int sg[10005];
int getsg(int x, int k) {
  if (sg[x] < 0) return 1;
  if (sg[x] != -1) return sg[x];
  if (getsg(x - 1, k) == 0 || getsg(x - 2, k) == 0 || getsg(x - k, k) == 0)
    return sg[x] = 1;
  else
    return sg[x] = 0;
}
int main() {
  int t, n, k;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    bool flag = true;
    if (k % 3 == 0) {
      int np = n % (k + 1);
      if (np % 3 == 0 && np != k) flag = false;
    } else {
      if (n % 3 == 0) flag = false;
    }
    if (flag)
      printf("Alice\n");
    else
      printf("Bob\n");
  }
  return 0;
}
