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