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