#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    long long n, k;
    cin >> n >> k;
    if (n < k) {
      if (n % 3 == 0)
        cout << "Bob" << endl;
      else
        cout << "Alice" << endl;
    } else {
      if (k % 3 != 0) {
        if (n % 3 == 0)
          cout << "Bob" << endl;
        else
          cout << "Alice" << endl;
      } else {
        n = n % (k + 1);
        if (n == k)
          cout << "Alice" << endl;
        else {
          if (n % 3 == 0)
            cout << "Bob" << endl;
          else
            cout << "Alice" << endl;
        }
      }
    }
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
