#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n, k;
    cin >> n >> k;
    if (n == 0) {
      cout << "Bob" << endl;
      continue;
    }
    if (k % 3) {
      if (n % 3 == 0)
        cout << "Bob" << endl;
      else
        cout << "Alice" << endl;
    } else {
      int np = n % (k + 1);
      if (np % 3 == 0 && np != k)
        cout << "Bob" << endl;
      else {
        cout << "Alice" << endl;
      }
    }
  }
}
