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