#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int tt;
  cin >> tt;
  while (tt--) {
    int n, k;
    cin >> n >> k;
    bool ans = true;
    if (n == 0) {
      cout << "Bob\n";
      continue;
    }
    if (k % 3 == 0) {
      int rem = n % (k + 1);
      if (rem == k)
        ans = true;
      else if (rem % 3 == 0)
        ans = false;
    } else {
      if (n % 3 == 0) ans = false;
    }
    if (ans)
      cout << "Alice\n";
    else
      cout << "Bob\n";
  }
}
