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