#include <bits/stdc++.h>
using namespace std;
set<int> good;
int main() {
  int q, n, k;
  cin >> q;
  for (int t = 0; t < q; t++) {
    cin >> n >> k;
    if (k == 3) {
      if (n % 4 == 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 {
        int tmp = n % (k + 1);
        if (tmp % 3 == 0 && tmp != k)
          cout << "Bob" << endl;
        else
          cout << "Alice" << endl;
      }
    }
  }
  return 0;
}
