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