#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  long n, k;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    bool win = true;
    if (k % 3 == 0) {
      int np = n % (k + 1);
      if (np % 3 == 0 && np != k) win = false;
    } else {
      int np = n % 3;
      if (np == 0) win = false;
    }
    puts(win ? "Alice" : "Bob");
  }
}
